4 ms·
Lacking Kubernetes specific experience, I have no idea what the article is talking about. Is it just “you can write micro services in different languages and de
by efitz 6y ago
Lacking Kubernetes specific experience, I have no idea what the article is talking about. Is it just “you can write micro services in different languages and deploy them in separate containers, and they can still talk to each other?” Why is that observation insightful?
Is there some special inter- on intra- container communication mechanism that the author is trying to highlight?
- closeparen 6y agoA sidecar is an alternative to an application-level library for something that needs to be present in every instance, e.g. knowledge about how to contact other services, or authorization checks on inbound calls. It's similar to another microservice in the sense that we're putting functionality across a network API instead of a function call. But unlike another microservice, a sidecar is deployed alongside each instance and usually inside the same network namespace, so there is no discovery/routing problem and latency is minimal.
- efitz 6y agoThank you, that clarifies things!
- est 6y agoI am wondering if those XML-SOAP people ever invented something like sidecar before?
- fxtentacle 6y agoIt was probably called XML-conditioner to go with the soap :)
- p_l 6y agoAdvanced, proper SOAP usage allowed for various patterns that acted similarly, but that generally falls under anything with middleware that jacks into messaging system
- king_magic 6y agoWait... so... it’s just a library... served as an API?
- harpratap 6y agoA library needs to be of the same language, sidecars can be polyglot. You can use a golang based sidecar with a python app, can't do that with a library.
- sethammons 6y agoWe have exactly that for a sidecar on one of our team’s k8s clusters. There is a legacy python 2.6 twisted service. It will not get priority to be updated (functionality is being slowly eroded into other services). It exposes its metrics in a non-standard way and updating it to emit to Prometheus was going to be non-trivial. Enter the sidecar. It lives next to each instance and scrapes the metrics and converts them over for Prometheus to consume, and happens to be written in Go. It was developed and released in a day or two.
- king_magic 6y agoRight - I guess I just don't think that just because sidecars can be polyglot doesn't make it a better approach than just writing a clean library.
- closeparen 6y agoLet's say you want to add auth tokens and/or TLS to an environment with a lot of heterogeneous legacy code in 6 different languages.
- tbrownaw 6y agohttps://morioh.com/p/e58a77b1d33b https://morioh.com/p/e58a77b1d33b The talk shows how to use CGO to make Go code available as a C library and then to use Cython to make this library available as a Python extension module.
- 6y ago
- NovemberWhiskey 6y ago>A sidecar is an alternative to an application-level library for something that needs to be present in every instance I see where you're coming from there; but it's worth also being explicit that it may be the only option (rather than an alternative) if, e.g. you do not own the code for which you're running the sidecar. Good examples here are sidecar proxies for service meshes: you're probably doing TLS termination and authorization in the proxy, and the underlying service might be a closed-source database with a binary protocol you know nothing about.