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

Make MAX_RETRIES configurable #466

Open
JosiahParry opened this issue Nov 11, 2024 · 3 comments
Open

Make MAX_RETRIES configurable #466

JosiahParry opened this issue Nov 11, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request WIP We are working on this feature internally

Comments

@JosiahParry
Copy link

I noticed that the maximum number of retries is set to 16.

const MAX_RETRIES: usize = 16;

With my proxy a user may be sent to an application that needs to perform a cold start. That time may be a few seconds or longer.

I have set the retry to wait 100ms before retrying.

    fn fail_to_connect(
        &self,
        _session: &mut Session,
        _peer: &HttpPeer,
        _ctx: &mut Self::CTX,
        mut e: Box<Error>,
    ) -> Box<Error> {
        e.set_retry(true);
        std::thread::sleep(std::time::Duration::from_millis(100));
        e
    }

Ideally, I'd like to be able to configure it to poll every x ms for a maximum Duration before finally giving up instead of a fixed number of retries.

@eaufavor eaufavor added the enhancement New feature or request label Nov 12, 2024
@johnhurt johnhurt added the help wanted Extra attention is needed label Nov 15, 2024
@gumpt
Copy link
Contributor

gumpt commented Nov 15, 2024

Envoy's retry policies are worth looking at here for inspiration/a good set of tunables. https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-retrypolicy

@xlfish233
Copy link

Is this issue still open? I'd like to work on implementing a more configurable retry strategy.

@JosiahParry
Copy link
Author

@xlfish233 not that i am aware of! This would be an awesome feature

@andrewhavck andrewhavck self-assigned this Dec 24, 2024
@andrewhavck andrewhavck added WIP We are working on this feature internally and removed help wanted Extra attention is needed labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WIP We are working on this feature internally
Projects
None yet
Development

No branches or pull requests

6 participants