Hacker News new | ask | show | jobs
by zokier 345 days ago
Having completely isolated ephemeral request handlers with no shared state and no persistent runtime makes very clean and nice programming model. It also makes deployments simple because there is no graceful shutdown or service management to worry about; in simplest case you can just drop in new executables and they will be automatically taken into use without any service interruption. Fundamentally CGI model allows leveraging lot of tools that Linux/UNIX has to offer.
1 comments

> there is no ... service management to worry about

Service management:

    systemctl start service.app
or

    docker run --restart=unless-stopped --name=myservice myservice:version
If it isn't written as a service, then it doesn't need management. If it is written as a service, then service management tools make managing it easy.

> there is no graceful shutdown ... to worry about

Graceful shutdown:

    kill -9
or

    docker kill -9 myservice
If your app/service can't handle that, then it's designed poorly.
I think the point is having to worry about runaway memory or other bitrot inherent in long running services?