Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry Issue with Gateway as RSocket Proxy #1355

Closed
FWinkler79 opened this issue Oct 16, 2019 · 1 comment
Closed

Retry Issue with Gateway as RSocket Proxy #1355

FWinkler79 opened this issue Oct 16, 2019 · 1 comment

Comments

@FWinkler79
Copy link

FWinkler79 commented Oct 16, 2019

I just saw issue #1319, so I apologize if this is simply not yet implemented.

I saw @spencergibb's nice presentation on SCG and RSocket and took the liberty to fork his sample and adjust it a little for my tests.

I added two failure-scenarios to the sample, one of which I would have expected another outcome of. I modified PingService's request-channel handling to retry in case of errors.

The scenario is as follows:

  1. run two gateway instances in cluster mode
  2. run ping and see maximum back pressure applied from gateway
  3. run pong and see how pings and pongs start flowing
  4. stop pong, simulating the pong instance going down.
  5. start pong again.

What I was hoping to see, is that ping receives an error, retries and again is confronted with maximum back pressure from the gateway.

What I saw instead is, that ping retries, silently keeps sending pings to the gateway cluster which seems to buffer the pings, and then forwards all of them to pong once that is up again.

I am not sure this is intended, and I am not 100% sure if maybe I have a bug in my own coding, but I think, it would be better, if the gateway sent maximum back pressure also in the case a remote service goes down. Maybe that goes into the direction of Deregistrations on disconnect in #1319?

If you want to try this out yourself, here is my adjusted fork:
https://github.com/FWinkler79/spring-cloud-gateway-rsocket-sample#failure-resiliency-2

It would be great to have this feature, as it would make it so much easier for application developers to create resilient Cloud applications - simply by properly handling back pressure (which they generally should have to anyway).

Also, having the gateway buffer the incoming requests from clients and replay them to servers once they are up again, might cause the servers to immediately go down again.

If my understanding is incorrect, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants