Live data from Hacker News

Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

github.com

11–20 of 41 posts

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#11

Zero 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…

Regarding zero dependencies, I meant that it is a static binary and does not need any external tools to be installed. For example, some alternatives require netcat to be installed.

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#12

Zero 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...

Interesting project, I was not familiar with that. Thanks for letting me know :)

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#13
post #8

Sometimes waiting for the address is not enough. For example, you might want to wait for a specific API enpoint to return 200 OK, or you might want to wait for database migrations to get applied. Is `is_ready` aiming to cover those cases in the future?

Interesting idea for a feature request. I would love to read a GitHub issue with your specific case so I can start investigating and think about how to solve a problem like this.

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#14
post #6

Zero 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…

I took the statement to imply no runtime dependencies, as no compile-time dependencies doesn’t really make sense.

The Linux kernel itself to handle the syscalls is probably also implied in this.

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#16
post #15

Alternative: write your applications to not depend on the liveness of other services to start up. Your ops will thank you.

Can you suggest to me one way for an API service to wait for a database to accept connections to run the database migrations without the API depending on the liveness of the database to start up?

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#17
Like other say easy to fix this with bash alone. But maybe if you add things like also waiting on other things it can increase your value u a little like also waiting on files, sql queries it can become a pocket knife of waiting for things? Albeit probably people will start saying it will do too much :)

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#18
post #15

Alternative: write your applications to not depend on the liveness of other services to start up. Your ops will thank you.

Can you suggest to me one way for an API service to wait for a database to accept connections to run the database migrations without the API depending on the liveness of the database to start up?

Start the server and respond 503 every time when your database and other dependencies are not ready. Couldn’t be easier.

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#19

Zero 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…

> Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler...

Came here to make the same comment. 0 dependencies would mean/infer (at least, to me) a lack of any dependencies but that doesn't seem to be the case[1]. There are 30 matches for the word `dependencies`.

[1] - https://github.com/Stavrospanakakis/is_ready/blob/main/Cargo...

Re: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

#20

Seriously? 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

This can certainly be zero dependency :)

Replace the use of netcat with pure bash to test a tcp (or udp) connection: </dev/tcp/$1/$2

Post reply on HN