4 ms·
It's the microservice philosophy: Why use a function call or fork/exec when you can use RPC? (At least CRI is binary RPC instead of JSON over HTTP/1.) Also, Go
by wmf 10y ago
It's the microservice philosophy: Why use a function call or fork/exec when you can use RPC? (At least CRI is binary RPC instead of JSON over HTTP/1.)
Also, Go doesn't dlopen AFAIK.
- bradfitz 10y agohttps://beta.golang.org/doc/go1.8#plugin https://beta.golang.org/doc/go1.8#plugin
- deleted 10y ago[deleted]
- vidarh 10y agoIt gets better. Take a look at rktlet, a CRI implementation for rkt (EDIT: I originally mistakenly wrote Docker). Specifically the runtime [1], which ends up shelling out to the "rkt" binary. So you end up running a new daemon that communicates with Kubernetes via gRPC, that then spawns rkt anyway. So you get to RPC and fork/exec. I'm sure that ends up "optimized away" at some point by e.g. having a rkt CRI implementation that just links in the relevant rkt code. But I'm left wondering why we need this complexity in the first place. [1] https://github.com/kubernetes-incubator/rktlet/tree/master/rktlet/runtime https://github.com/kubernetes-incubator/rktlet/tree/master/r...
- chrissnell 10y agoI don't get your argument. If I'm reading this correctly, you're arguing that system calls and/or a call to a shared library function are cleaner than RPC to another process? The overhead of RPC in an application like this is tiny and the cost of an additional process on 2016 equipment is non-existent.
- vidarh 10y agoIt's more things that can fail that now needs monitoring. (EDIT:) And in the specific case of rktlet you still end up forking/execing anyway. The overhead isn't necessarily a big deal (and can easily go the other way - if the request frequency is high enough, it's cheaper to keep the process around), but it does also potentially add up.