News for hackers. Stuff that matters.
Re:Connecting Kubernetes services with linkerd by jimktrains2 on Monday April 10, 2017 @10:15PM (#14084342)
> The whole point of Linkerd is moving logic out of your app. Linkerd is like a library but, instead of being in-process, it inserts itself between the app and whatever the app needs to talk to. The app just dials http://foo.svc/, and Linkerd sends the connection to the right place; it doesn't need to know where foo.svc is.

That's just DNS.

> Many companies, including mine, already run an internal load-balancer (such as HAProxy) that takes care of routing traffic between microservices.

Why not DNS round-robin?

> I recommend reading the documentation, because drop-in resilience is really the whole point.

Fundamentally, the application itself needs to be resilient. No proxy will make it so. It could help, but it can't do it.

Re:Connecting Kubernetes services with linkerd by chrisboulton on Monday April 10, 2017 @10:44PM (#14084455)
> That's just DNS.

That's not just DNS. Well, it might be - it depends on your environment.

For example: In a world where you have some kind of containerization, or scheduler responsible for deploying your services you typically to have services (or different instances of your services), running on ports determined at runtime. You might solve this with an off-host load balancer, so your frontend applications don't need to worry about it, but now you need to worry about those other things: circuit breaking, retry mechanisms, etc between your application and its middle-tear load balancer.

A common deployment strategy for something like linkerd (or Envoy) would be as a sidecar process, on the same host where you don't need to worry about the reliability of the network to talk to a remote service, because something else is taking care of 90% of your concerns for you.

> Why not DNS round-robin?

There's functionality offered by load balancing at L7 that you can't do with round-robin DNS. You end up having to push that complexity into each service you develop - retry mechanisms, circuit breaking, and routing decisions if you're going to try do green/blue or canary deployments.

You might say "solve this with a library", but the reality is you have to reinvent the wheel, you have to keep that library in sync to ensure the behaviour is consistent, and if you're in an organization that develops services in "N" languages, that challenge can be even greater.

> Fundamentally, the application itself needs to be resilient. No proxy will make it so. It could help, but it can't do it.

Absolutely. Your services still need to be able to fail gracefully, but this just moves the complexity of a whole host of other issues to a single, and common spot.

Re:Connecting Kubernetes services with linkerd by cookiecaper on Tuesday April 11, 2017 @05:20PM (#14092558)
>That's not just DNS. Well, it might be - it depends on your environment.

In short, another problem introduced by containers and not relevant to non-containers. Why can't a container get its own IP and port like everything else? FreeBSD jails do. Why make it opaque and put the "ingress" component inside of k8s or Docker? It'd be reasonable for k8s to act as a DHCP/DNS server, but not to swallow the whole world.

Re:Connecting Kubernetes services with linkerd by lobster_johnson on Monday April 10, 2017 @11:13PM (#14084551)
> That's just DNS.

No, it's a bit more complicated than that, as chrisboulton explains (so I won't go into detail).

You could use a dynamic DNS server such as Consul for discovery, and people do. Last I checked, you still had to fight eagerly caching clients, but that's probably doable. But there's still a host of other issues that Linkerd addresses.

Again, I strongly recommend reading about Finagle to understand what this is trying to solve.

Another thing Linkerd brings to the mix is instrumentation and tracing. Instead of building this into every single sender and receiver, Linkerd can collect tracing data for you and make it available for other subsystems to ingest, such as Zipkin or Prometheus.

Re:Connecting Kubernetes services with linkerd by olix0r on Tuesday April 11, 2017 @01:29PM (#14090341)
> Why not DNS round-robin?

Round-robin may be sufficient for your needs. However, the load balancing techniques that linkerd employs solved real production issues for us. These techniques allowed us to be paged less frequently for minor errors and we could more reliably make changes to the system without causing user-facing issues.

See https://blog.buoyant.io/2016/03/16/beyond-round-robin-load-b...