How to get ip address from your server?

This should go in a shard, really. I’m not sure this fits in the stdlib. It’s not a very common usecase.

If you bind on 0.0.0.0 because you deploy on a cluster system with micro services ( Crystal and Go bread and butter ) and you do not know each external IP internally. There are times that your code may need to know what IPs the http server really binds to… In my case it is needed for the micro services to know from themselves where the brother services are located ( what requires self discovery of the external IP and publishing to the swarm ).

This question is not so rare, that Ruby also included several methods in the standard framework.

Shards are good and well but in a lot of cases when a shard get published, it does not mean it gets maintained. crystalshards.xyz tracking is already full of shards that have not seen updates in ages with pull or issue requests hanging in limbo.