Live data from Hacker News

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

github.com

21–30 of 41 posts

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

#21

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.

This is fine, and what I understood from "zero dependencies", that I can drop it in a directory and it'll just work. As far as I'm concerned, this complaint is moot.

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

#22

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

When you see someone advertise a tool to put in your containers to do something, why are you immediately thinking "no compile-time dependencies", rather than "no runtime dependencies"?

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

#23

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 :)

Ooh they could even make it a multi call binary like busybox! I imagine without it, some kind of mode flag would be required.

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

#24

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…

>Feels like something very similar should be built into tools like docker-compose.

In docker compose you can use `depends_on` [0] to define dependencies between containers and by default it will wait until a dependent container is "ready".

But you can also use a more verbose syntax to wait until a container is "healthy", as defined by its own healthcheck.

    services:
      web:
        depends_on:
          db:
            condition: service_healthy
      db:
        image: postgres

[0] https://docs.docker.com/compose/compose-file/05-services/#de...

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

#25
post #22

Earlier quoted context omitted.

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

When you see someone advertise a tool to put in your containers to do something, why are you immediately thinking "no compile-time dependencies", rather than "no runtime dependencies"?

> When you see someone advertise a tool to put in your containers to do something...

The title claims "0 dependencies", not "0 runtime dependencies" nor "0 compile-time dependencies". In other words, the word dependencies - by itself - is encompassing both runtime and compile-time dependencies.

Think of reading the title at face-value - but as if someone else had written it, with no exposure to your project, its use-case, behaviour, etc. - before it was read.

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

#26
post #15

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

That makes a lot of sense for application servers when one controls the stack and can implement something like exponential backoff, and services are expected to already be running.

However it is not realistic to make sure all library dependencies used behave properly for more lambda-like jobs where a library/app like "wait for" is very useful since it reduces the backoff parameters that ops needs to know about, and reduces unnecessary errors in logs.

Take GCP Cloud SQL Auth Proxy [1] for example which simplifies the details of securely connecting to a database without exposing long-term credentials to app code. Typically for the audience that uses the proxy, it is run as a sidecar container in Kubernetes Pod and has a non-deterministic startup time in the range of a few seconds. There is no "depends_on" facility like in Docker (at least when I had to use it). Your batch job could potentially always fail if the proxy cannot establish a connection to the database before your minimal database migration container starts up. Building the backoff inside the migration app makes it more opaque for ops teams. Having this "wait for" run in a startup script before the main app allow ops to tune its parameters, such as through environment variables, so that the job behaves appropriately under health probes [2] for higher level backoffs. All of which can be configured without recompiling the main app code, or embedding the functionality in the first place.

[1] https://cloud.google.com/sql/docs/postgres/connect-auth-prox...

[2] https://kubernetes.io/docs/tasks/configure-pod-container/con...

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

#27
post #22

Earlier quoted context omitted.

When you see someone advertise a tool to put in your containers to do something, why are you immediately thinking "no compile-time dependencies", rather than "no runtime dependencies"?

> When you see someone advertise a tool to put in your containers to do something... The title claims "0 dependencies", not "0 runtime dependencies" nor "0 compile-time dependencies". In other words, the word dependencies - by itself - is encompassing both runtime and compile-time dependencies. Think of reading the title at face-value - but as if someone else had written it, with no exposure to your project, its use-…

Someone else did write it, and I didn't have any exposure to the project, use case, behaviour, etc, before I read it.

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

#28
post #27

Earlier quoted context omitted.

> When you see someone advertise a tool to put in your containers to do something... The title claims "0 dependencies", not "0 runtime dependencies" nor "0 compile-time dependencies". In other words, the word dependencies - by itself - is encompassing both runtime and compile-time dependencies. Think of reading the title at face-value - but as if someone else had written it, with no exposure to your project, its use-…

Someone else did write it, and I didn't have any exposure to the project, use case, behaviour, etc, before I read it.

Ah, thought you were the OP. That's my bad.

The "dependencies" point still stands, though, in that the term - generally - encompasses both.

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

#29

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…

>Feels like something very similar should be built into tools like docker-compose. In docker compose you can use `depends_on` [0] to define dependencies between containers and by default it will wait until a dependent container is "ready". But you can also use a more verbose syntax to wait until a container is "healthy", as defined by its own healthcheck. services: web: depends_on: db: condition: service_healthy db:…

That's true.

For example, in the case of PostgreSQL, there is already a tool called pg_isready [0] to do this inside a healthcheck as you described.

services: postgres-db: image: postgres healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"]

  application:
    image: image
    depends_on:
      postgres-db:
        condition: service_healthy
However, this is not the case for other databases/services.

[0] https://www.postgresql.org/docs/current/app-pg-isready.html

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

#30
post #27

Earlier quoted context omitted.

Someone else did write it, and I didn't have any exposure to the project, use case, behaviour, etc, before I read it.

Ah, thought you were the OP. That's my bad. The "dependencies" point still stands, though, in that the term - generally - encompasses both.

To be honest, I wanted to make the title more specific regarding dependencies but the title was already too big.
Post reply on HN