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

Multiple Address Support Request #23

Closed
anvari1313 opened this issue Mar 5, 2022 · 5 comments
Closed

Multiple Address Support Request #23

anvari1313 opened this issue Mar 5, 2022 · 5 comments
Assignees
Labels
enhancement Improve existing functionality or make things work better

Comments

@anvari1313
Copy link

What do you think about adding multiple addresses support? For example for HTTP it can be something like this:

wait4x http http://srv1:8080,http://srv2:8080

If both http://srv1:8080 and http://srv2:8080 return the expected result, wait4x exits successfully and otherwise it should be failed.

Maybe we can use comma separated string that is mentioned above or split strings like this:

wait4x http http://srv1:8080  http://srv1:8080

It can help us a lot to improve our deployment process.

@atkrad atkrad added the enhancement Improve existing functionality or make things work better label Mar 5, 2022
@atkrad
Copy link
Owner

atkrad commented Mar 5, 2022

Hi Ahmad,

Thanks for your suggestion. It is an interesting feature. If we want to implement that with multiple arguments, Maybe it has a conflict with the #22 or other parts of Wait4X.
Anyway, We need time to think about that to find the best solution for implementing that.

Is it possible to explain your use case on the deployment process? Maybe I can suggest another solution.

@anvari1313
Copy link
Author

Hi Mohammad,

As you know, we use initContainers in k8s Deployment for our API gateway to check the healthiness of upstream backends (in On-Demand Environments). For each service, there's a wait4x container sending an HTTP request to it. As the number of microservices grows, more init containers are added and it makes API gateway pod restarts very time-consuming (For example for a config change).
A simple solution is to run all of them in just one container and chain wait4x commands with && of bash. The issue is it doesn't provide enough visibility about which services have issues unless we set the log level of wait4x to debug.
I was thinking that maybe checking multiple addresses with more detailed logs can be a useful feature.

By the way, I would be glad to contribute if you decide to have this feature.

@atkrad
Copy link
Owner

atkrad commented Mar 10, 2022

Hi Ahmad,

Based on our conversation. You can try our new feature https://github.com/atkrad/wait4x#command-execution to have a single initContainer instead of multiple of initContainer.

If the feature doesn't resolve your issue, I would gladly accept a pull request for that.

@atkrad atkrad self-assigned this Mar 13, 2022
@anvari1313
Copy link
Author

Hi Mohammad,

Thanks for your suggestion. It will reduce the number of initContainers

@atkrad
Copy link
Owner

atkrad commented Apr 11, 2022

Hi @anvari1313,

Currently, Wait4X supports multiple inputs like this:

wait4x tcp localhost:8081 localhost:8082 localhost:8083 -t300s

It checks all of the inputs paralleled. I hope the feature can be helpful for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or make things work better
Projects
None yet
Development

No branches or pull requests

2 participants