Release: serverino - please destroy it.

Andrea Fontana nospam at example.com
Tue May 10 14:52:10 UTC 2022


On Tuesday, 10 May 2022 at 13:34:27 UTC, Adam D Ruppe wrote:
> On Monday, 9 May 2022 at 20:37:50 UTC, Andrea Fontana wrote:
>> The same goes for cgi/fastcgi/scgi and so on.
>
> Well, cgi does one process per request, so there is no worker 
> pool (it is the original "serverless" lol).
>
> fastcgi is interesting because the Apache module for it will 
> actually start and stop worker processes as-needed. I don't 
> think the the nginx impl does that though.

Some daemons can manage this by themselves (once again: check  
php-fpm  "dynamic" setting).

Serverino can do it as well. You can set in configuration the max 
and min number of workers. It's easy:

```
@onServerInit auto setup()
{
     ServerinoConfig sc = ServerinoConfig.create();
     sc.setMinWorkers(5);
     sc.setMaxWorkers(100);
     return sc;
}
```

If all workers are busy the daemon will launch a new one. You 
might be interested in
setMaxWorkerLifetime() and  sc.setMaxWorkerIdling() too!

> But the nicest thing about all these application models is if 
> you write it in the right way, you can swap out the approach, 
> either transparently adding the i/o event waits or just adding 
> additional servers without touching the application code. 
> That's a lot harder to do when you expect shared state etc. 
> like other things encourage.

I would mention that if something goes wrong and a process crash 
or get caught in an infinite loop, it's not a problem. Process is 
killed and wake up again without pull all the server down.

Andrea




More information about the Digitalmars-d-announce mailing list