Live data from Hacker News

Container technologies at Coinbase: Why Kubernetes is not part of our stack

blog.coinbase.com

291–300 of 414 posts

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#291
post #131

Earlier quoted context omitted.

I work on a 2-person project and decided to go with kubernetes (through digitalocean) for the cluster. I am managing everything with terraform and I don't have any big problems. I like that I can write everything as terraform manifests, have it diffed on git push and applied to prod if I want to. Sure it had a learning curve but now I just describe my deployments and k8s does the rest, which then reflects back on dig…

if you can run everything on a $10 vm...do you really need k8 ?

Sure, you can go without it. But you'll need to write a lot of annoying scripts manually.

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#293
post #11

> We would need to build/staff a full-time Compute team This actually was a very real problem at my current job. The data pipeline was migrated to k8s and I was one of the engineers that worked to do that. Unfortunately, neither myself (nor the other data engineer) was a Kubernetes guy, so we kept running into dev-ops walls while also trying to build features and maintain the current codebase. It was a nightmare. If…

GKE is fantastic compared to EKS.

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#294
post #163

Earlier quoted context omitted.

These are commonly raised concerns, all of which have answers much simpler than "install this giant distributed system". I'll go ahead and answer them since I take the questions to be in good faith... > How do you run an application on a cluster of plain old linux machines? Build a package, install it in an image, run that image in an autoscaling group (or whatever equivalent your cloud of choice offers). > How do yo…

So if you'll indulge me -- this list is exactly why a system like Kubernetes is valuable and why I think personally that it contains a lot of essential complexity. Kubernetes attempts to do all of the above, which is why it's so massive, and I'd argue it's actually less complex than knowing all the tools above -- but it's an equal degree less universally applicable. In this way, it's perfect for the dev who never wan…

Devops person here: I already know all of these answers and would still choose Kubernetes over hand-rolling all of this again and again.

"Just use Packer, some AMIs, some ASGs, some CF templates, some ELBs, some EC2 instances!"

No thanks: I'll Terraform an EKS cluster in 30 lines of HCL and deploy my applications with a Dockerfile and a handful of YAML files.

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#295
post #144

Earlier quoted context omitted.

I'm also on a 2-person project on DigitalOcean k8s, also very happy. K8s is kind of messy compared to Heroku, which I don't love, but is also way more powerful and can be more secure. I don't know what I'd use instead of it, exactly as you said. Also, we run a VPC-only K3s node for some simple internal tools that works great as well.

> Also, we run a VPC-only K3s node for some simple internal tools that works great as well. We do exactly the same thing! We have a one-node k8s for all these dev things that just works. Everything is containerized for local dev anyway so moving it to k8s was just writing the deployment manifest. On heroku, all of these would be separate dynos (or one glued-together dyno that does everything). On a self-hosted VM we'…

You really should write an article detailing how all this is set up. It sounds fascinating.

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#296

Given Coinbase's reliability track record [1][2][3], I'm not entirely sure why I'd listen to devops "wisdom" coming from their corner. [1] https://www.reddit.com/r/CoinBase/comments/gh3b5t/coinbase_c... [2] https://www.reddit.com/r/Bitcoin/comments/6gtwyi/every_singl... [3] https://www.reddit.com/r/CryptoCurrency/comments/ggr80l/i_do...

They've worked to fix their trading system to address these 100X spikes in trading volume - it's less about _how_ they run their stuff and more about _what_ they were running...

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#297
post #179

Earlier quoted context omitted.

> I don't see how k8s avoids the need to learn about cloud vendor specific tech e.g searching "aws RDS k8s" Not sure what you mean here. Kubernetes is designed to be cloud and vendor agnostic. And RDS is a hosted database that you connect to from your application. Whether that applications runs standalone, in a container or VM is irrelevant.

> Kubernetes is designed to be cloud and vendor agnostic. But it’s not. Connecting to EKS is completely different from connecting to GCP. Setting up worker nodes is completely different too, oh and load balancers. It’s only the last mile that’s similar.

Provisioning a new cluster on each of these platforms is tens of lines of Terraform.

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#298
post #163

Earlier quoted context omitted.

> Plain old linux is the alternative How do you run an application on a cluster of plain old linux machines? How do you do load balancing? How do you scale up and down? How do you update your app without downtime? How do you roll back easily if something goes wrong? How do you ensure all your servers are running the same version of dependencies? How do you update those dependencies? How do you replicate your environm…

These are commonly raised concerns, all of which have answers much simpler than "install this giant distributed system". I'll go ahead and answer them since I take the questions to be in good faith... > How do you run an application on a cluster of plain old linux machines? Build a package, install it in an image, run that image in an autoscaling group (or whatever equivalent your cloud of choice offers). > How do yo…

Would you mind pointing out some examples that you can achieve these on a bare-bones installation in an automated manner? Like, I mean sharing some real examples that I can install and forget. You can deploy the simplest "hello world" webserver in any language of your choice.

>> How do you run an application on a cluster of plain old linux machines?

> Build a package, install it in an image, run that image in an autoscaling group (or whatever equivalent your cloud of choice offers).

How come it is any different than running the Docker image on Kubernetes? The image build process is the same, delegating running the image to the platform is the same, the only difference at this point is the name of the platform you are running. Even if you were deploying ZIP archives to Elastic Beanstalk, if it doesn't work as expected, you'd have to debug it as an outsider, and you'd still have to know about the technology. I don't see how it is any different than Kubernetes.

>> How do you update your app without downtime?

> Blue-green deployment, or phased rollout.

How exactly? There are gazillion ways of doing them, they are rough concepts, what we need is a reliably working setup that requires as much effort from us as possible, and there are absolutely no standards on how to do them. Are you going to use Ansible? Maybe just SSH into the node and change the symlink? Maybe some other ways?

>> How do you replicate your environment if you want to add a new server to your cluster?

> Start the server from the same image.

How do you do that? You'd either do that manually on AWS console, or build some tooling to achieve that. If you were to do that via the autoscaling options the vendor is providing, then it is no different than Kubernetes: if that doesn't work then you'd have to debug regardless of the platform that is managing the autoscaling.

>> If your app has microservices how do services discover each other?

> Consul, or DNS, depending on your appetite

What is the difference between trying to learn how does Consul handle service discovery vs how does Kubernetes handle it?

>> How do you mount volumes from cloud storage?

> It's a bit unclear exactly what you mean here, but I'll assume you mean either block devices (just attach them at machine boot, or on startup if they need a claim), or NFS.

Would you mind sharing examples that are not vendor-specific and that'd be configurable on a per-service fashion easily, hopefully without writing any code?

>> How do you update configuration?

> Either update Consul and have it propagate configuration, or update a configuration package and push it out.

How is this any better than pushing your changes to Kubernetes? I personally don't know how does Consul work or how to update a configuration package and push it out to somewhere, I don't even know where to push them. In this context, learning them is also not any better than learning how to do them on Kubernetes.

>> How do you automatically restart failed applications?

> Systemd restart policy.

So, this means that you'd need to learn how to utilize Systemd properly in order to be able to start running your application and write the configuration for that somewhere, and also deal with propagating that configuration to all the machines.

>> How do you monitor if your applications are working?

> From outside - something like pingdom, and some kind of continuous testing. It's critical that this is measured from the perspective of a user.

The question was not really that. The tools like pingdom won't help you if an internal dependency of your application starts failing suddenly. You need a standardized solution for gathering various standard metrics from various services of yours, things like request rate, error rate, request durations, as well as defining custom metrics on the application level such as open database connections, latencies on dependencies, and so on. You will definitely need a proper metrics solution for running any serious workload, and in addition to that you'll also want to be able to alert on some of these metrics. There is no standardized solution for these problems, which means you'll need to roll your own.

>> How do you view your log files remotely?

> Cloudwatch, Syslog, SSH (depending on requirements).

The proper alternative to the Kubernetes' solution is Cloudwatch, and even then the simplicity of `kubectl logs ` is still better than trying to understand how Cloudwatch works.

>> How do you port-forward from localhost to your Linux server to test your app locally?

> SSH.

This is not a trivial setup. Let's say you have a service A running remotely but it is not exposed, meaning that you cannot reach it from your local machine, and you'd like to be able to use that while developing your service B locally, how would you set this up in an easy way?

The points regarding the images are the same points as any Docker image, so it really boils down to the choice and one doesn't have an advantage over the other in this context.

What I am trying to say is: there are quite a lot of problems when running any kind of serious workload, and there are thousands of alternative combinations for solving them, and they were solved even before Kubernetes existed; however, there were no standardized way of doing things, and that's what Kubernetes is allowing people to do. There are definitely downsides of Kubernetes, but trying to point specific examples like these don't help as they are just names of individual software that also have learning curve and they all operate differently. I do wish there was a simpler solution, I wish Docker Swarm succeeded as a strong alternative for Kubernetes for simpler cases as it is brilliant working locally, and I wish we didn't have to deal with all these problems, but it is what it is.

As of today, I can write a Golang web application, prepare a 10-lines Dockerfile, write ~50 lines of YAML and I am good to go: I can deploy this application on any Kubernetes cluster on any cloud provider and have all these stuff defined above automatically. Do I need to add a Python application alongside: I just write another 20-lines Dockerfile for that application, again ~50 lines of YAML for Kubernetes deployment and bam, that's it. For both of these services I have automated recovery, load balancing, auto-scaling, rolling deployments, stateless deployments, aggregated logging, without writing any code for any tooling.

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#299
post #273
post #233

Earlier quoted context omitted.

Isn't that the benefit of cloud? Maybe I'm spoiled by GCP and it's not the same in other providers; but I can have a brand new debian VM configured and operational in less than 10s (less the time that I run my own startup script). Debian machines spawn with incredible speed; not much slower (if at all slower) than a new container.

Spawning a bare bones VM is easy and fast, the problem is getting the applications there, which is where k8s shines.

Maybe I'm spoiled then, it takes less than 2s to spin up my application on a new instance. :\

There are also many options for creating Debian based image files with all you need baked in.

I guess it depends very much on the application you have.

Re: Container technologies at Coinbase: Why Kubernetes is not part of our stack

#300

Earlier quoted context omitted.

The "adhoc" part is the problem. K8S is standardized and offers high-availability, failover, logging, monitoring, load balancing, networking, service discovery, deployments, stateful services, storage volumes, batch jobs, etc. And it can run self-contained on a single machine or scale out to 1000 nodes. Why piece all of that functionality together yourself into some fragile framework instead of using a industry stand…

It can be worth it to piece things together yourself. A complex tool can also be fragile if you don't take the time to learn and understand every facet of it. If you only need certain parts of what k8s offers, building those parts yourself can offer you more stability, control, and insight into what your application is doing. As with anything else it varies case-by-case.

Building one yourself is a good exercise for understanding something, I agree.

The problem with that logic is everyone on your team will need to do it, so you're going to be stuck picking a standard. Should it be yours, should it be mine, or should we both just learn something with a large community behind it?

Nothing is perfect of course, but k8s makes a really good target for CI/CD, which is something you want when you're developing as part of a team. If you're not quite a team yet and you don't know how to bootstrap k8s and CI/CD, then you need to figure out when those types of things are important.

Probably lots of people could stick with a monolith and a VM for longer than they did, but automated testing will save you a fair bit of time if you're not figuring out how to do it at the same time.

Post reply on HN