Handling back pressure with services #242
Replies: 2 comments 2 replies
-
I'm not quite sure I follow 😕 Since Note that you can still use If parts of your system do care about backpressure the recommendation is to wrap your entire app in a middleware and then drive readiness from there. Similarly to whats shown here. |
Beta Was this translation helpful? Give feedback.
-
Hi, the link provided in this discussion points to an old version of axum. I can't find more up to date documentation on the argument. Are the information regarding back pressure contained in this discussion still relevant? Are there any more up to date docs? EDIT: found it -> routing-to-servicesmiddleware-and-backpressure |
Beta Was this translation helpful? Give feedback.
-
Hey,
Possibly I don't understand the complexity completely although I found the thing with service needed to be ready before a request not playing very with routes based on request not completely right.
Here's what I was thinking could be a possible way, there's a router service which routes to other services and needs to be ready for the server to start serving requests. And if the router service needs DB or any other resources then waiting on that service before starting servicing request makes sense. However for the routed services, could they not still be polled on each request and if unavailable (possibly because it serves only certain number of concurrent requests?) return a 503 which tells the client to retry again?
Also there was a MakeService initially in Hyper with similar facility of poll and creating new service instance and felt that played well.with actually load balancing and such but then haven't seen that being actually used as such.
Beta Was this translation helpful? Give feedback.
All reactions