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

new test: retry policy #13

Open
Geal opened this issue Oct 3, 2018 · 10 comments
Open

new test: retry policy #13

Geal opened this issue Oct 3, 2018 · 10 comments
Assignees
Labels

Comments

@Geal
Copy link
Member

Geal commented Oct 3, 2018

  • we set up an application with two backends, but only one of the backend server is actually up
  • the client does a serie of requests (no keep-alive)
  • we check that sozu correctly reports one of the backend as down after a few requests
@NotBad4U NotBad4U added this to the first test suite milestone Oct 5, 2018
@NotBad4U
Copy link
Contributor

NotBad4U commented Oct 5, 2018

Can you describe:

we check that sozu correctly reports one of the backend as down after a few requests
We got multiples HTTP 503 ?

@Geal
Copy link
Member Author

Geal commented Oct 5, 2018

two things to check:

  • the client will receive a 503 response
  • sozu's logs will show the message "no more available backends for application <app_id>"

@NotBad4U
Copy link
Contributor

NotBad4U commented Oct 8, 2018

Done in 894c126

@NotBad4U NotBad4U self-assigned this Oct 8, 2018
@NotBad4U NotBad4U closed this as completed Oct 8, 2018
@Geal Geal reopened this Oct 8, 2018
@Geal
Copy link
Member Author

Geal commented Oct 8, 2018

there's only one request there, so we're not sure it would try the backend that is down right away, and the test does not verify in sozu's logs that one of the backends was detected as down

@NotBad4U NotBad4U closed this as completed Oct 8, 2018
@Geal Geal reopened this Oct 8, 2018
@NotBad4U
Copy link
Contributor

NotBad4U commented Oct 8, 2018

there's only one request there, so we're not sure it would try the backend that is down right away

Not really if we use a little trick like I did: I put the down backend in top of the backends list and use the roundrobin algorithm which has the effect of creating a connection attempt for this backend.

The test does not verify in sozu's logs that one of the backends was detected as down

Can I use this log https://github.com/sozu-proxy/sozu/blob/e0d026a4ac856057cd23e9c5c92f2b7b1f7d7d18/lib/src/network/http.rs#L506 ?

@Geal
Copy link
Member Author

Geal commented Oct 9, 2018

yes

@Geal
Copy link
Member Author

Geal commented Oct 9, 2018

it would probably be useful to have a test to detect the "no more available backends" message, but for this we would need to d requests in a loop until the message appears

@NotBad4U NotBad4U added the wip label Oct 9, 2018
@NotBad4U
Copy link
Contributor

NotBad4U commented Nov 7, 2018

The problem is when we set up an application with two backends, but only one of the backend server is actually up, the log "no more available backends" is never logged but when we set up an application with only backend down (no backend up) then that work.

@Geal
Copy link
Member Author

Geal commented Nov 13, 2018

to get the "no more available backends" message, we need another test with one or more backends in the configuration, but no actual backend server is running

@NotBad4U
Copy link
Contributor

Okai I'll do that

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

No branches or pull requests

2 participants