Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
1–10 of 41 posts
Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#2A neat project, though. I think that this is best solved in the application itself (e.g. your server starts but returns HTTP errors while the database is unavailable), but being able to retrofit this behaviour into any existing application seems useful. Feels like something very similar should be built into tools like docker-compose.
Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#3Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler... A neat project, though. I think that this is best solved in the application itself (e.g. your server starts but returns HTTP errors while the database is unavailable), but being able to retrofit this behaviour into any existing application seems useful. Feels like something very similar should be built i…
See: https://f1bonacc1.github.io/process-compose/health/?h=port#r...
Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#4Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler... A neat project, though. I think that this is best solved in the application itself (e.g. your server starts but returns HTTP errors while the database is unavailable), but being able to retrofit this behaviour into any existing application seems useful. Feels like something very similar should be built i…
The IMO superior https://github.com/F1bonacc1/process-compose project has this built in, while allowing to manage regular programs that don't require containers. See: https://f1bonacc1.github.io/process-compose/health/?h=port#r...
Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#5Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler... A neat project, though. I think that this is best solved in the application itself (e.g. your server starts but returns HTTP errors while the database is unavailable), but being able to retrofit this behaviour into any existing application seems useful. Feels like something very similar should be built i…
Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#6Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler... A neat project, though. I think that this is best solved in the application itself (e.g. your server starts but returns HTTP errors while the database is unavailable), but being able to retrofit this behaviour into any existing application seems useful. Feels like something very similar should be built i…
Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#7Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler... A neat project, though. I think that this is best solved in the application itself (e.g. your server starts but returns HTTP errors while the database is unavailable), but being able to retrofit this behaviour into any existing application seems useful. Feels like something very similar should be built i…
The IMO superior https://github.com/F1bonacc1/process-compose project has this built in, while allowing to manage regular programs that don't require containers. See: https://f1bonacc1.github.io/process-compose/health/?h=port#r...
Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#8Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#9 is_ready() {
while ! nc -z $1 $2; do
echo "Waiting for $1:$2..."
sleep 1
done
echo "$1:$2 is accessible."
}
is_ready google.com 443 &
is_ready x.com 443 &
waitRe: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
#10Seriously? is_ready() { while ! nc -z $1 $2; do echo "Waiting for $1:$2..." sleep 1 done echo "$1:$2 is accessible." } is_ready google.com 443 & is_ready x.com 443 & wait
I built it for many reasons: - Most docker images do not contain netcat so you would have to download one of them in any case. - In the case of is_ready, you won't have to write this script yourself. - Repositories like this had a lot of traffic so I supposed that engineers need a similar tool but this repository requires wget and netcat as dependencies. For this reason, I built my own without any dependencies. https://github.com/eficode/wait-for