3 ms·
Having a structured way to select the best among several backends is completely canonical and expected in systems like these. Reliable systems are built at the
by jeffbee 5y ago
Having a structured way to select the best among several backends is completely canonical and expected in systems like these.
Reliable systems are built at the client, not at the backend. You get those extra 9s from having a smarter client, not from having a more reliable backend. Trying to make your lowest layers flawless is a fool's errand.
- morelisp 5y agoIf public, I'd love to see a real example of Go code you believe does this correctly.
- jeffbee 5y agohttps://github.com/grpc/grpc-go/tree/master/balancer https://github.com/grpc/grpc-go/tree/master/balancer
- morelisp 5y agoI mean yeah if HTTP is your layer 4 and not your layer 7 you can do this transparently, but you also just kicked the problem up a level. gRPC connections will have the same issue if you return some gRPC error code. In gRPC terms the connection state was always Ready, there’s no reason the conn would’ve been kicked out of the lb pool.
- jeffbee 5y agoIt doesn't necessarily have to get kicked out of the pool. You can use error-averse balancers that will never send the same request to a channel that already gave it an error, or you can have N channels and just roll the dice on a (N-1)/N probability of getting a different channel the second time.