www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Serverino v0.7.17 is here!

reply Andrea Fontana <nospam example.com> writes:
Hi everyone,

I've just released serverino 0.7.17, with several improvements. 
Here are a couple of highlights:

**Hot reload just got smarter.**
You can now gracefully reload all workers without losing any 
active or queued requests. This means you can deploy updated 
worker code and have it take effect *immediately without 
interrupting your server*.

  * On POSIX systems, send SIGUSR1 to the server process: `kill 
-SIGUSR1 <server_pid>`

  * On Windows, serverino watches for a temporary canary file — 
just delete it to trigger a reload.

Even better: if you enable config.enableWorkersAutoReload(), 
serverino will automatically restart workers whenever the 
executable is recompiled, again without interrupting any 
in-flight requests. Watch auto-reload in action in this [video on 
youtube](https://www.youtube.com/watch?v=708oeTiifMw).

**KQueue is now the default backend on macOS.**
It has been available for a while on both macOS and Linux, but 
it's now officially the default on macOS (on linux *epoll* is set 
as default backend)

Fastest way to test serverino:
```
dub init -t serverino blah
cd blah
dub
```

More info, docs, examples on 
[github](https://github.com/trikko/serverino)


Andrea
May 24
next sibling parent reply Ferhat =?UTF-8?B?S3VydHVsbXXFnw==?= <aferust gmail.com> writes:
On Saturday, 24 May 2025 at 16:50:02 UTC, Andrea Fontana wrote:
 Hi everyone,

 I've just released serverino 0.7.17, with several improvements. 
 Here are a couple of highlights:

 **Hot reload just got smarter.**
 You can now gracefully reload all workers without losing any 
 active or queued requests. This means you can deploy updated 
 worker code and have it take effect *immediately without 
 interrupting your server*.

  * On POSIX systems, send SIGUSR1 to the server process: `kill 
 -SIGUSR1 <server_pid>`

  * On Windows, serverino watches for a temporary canary file — 
 just delete it to trigger a reload.

 Even better: if you enable config.enableWorkersAutoReload(), 
 serverino will automatically restart workers whenever the 
 executable is recompiled, again without interrupting any 
 in-flight requests. Watch auto-reload in action in this [video 
 on youtube](https://www.youtube.com/watch?v=708oeTiifMw).

 **KQueue is now the default backend on macOS.**
 It has been available for a while on both macOS and Linux, but 
 it's now officially the default on macOS (on linux *epoll* is 
 set as default backend)

 Fastest way to test serverino:
 ```
 dub init -t serverino blah
 cd blah
 dub
 ```

 More info, docs, examples on 
 [github](https://github.com/trikko/serverino)


 Andrea
It is so lovely to see you improving and keeping the serverino alive. I understand that one can update the server executable without having to shut the entire thing down. Please correct if I am wrong. Even though I haven't been doing web stuff recently, it is my go-to solution when I need it because Serverino is relatively lightweight. Please keep up the good work. I hold an Aperol Spritz for the good work of you :) Ferhat
May 26
parent Andrea Fontana <nospam example.com> writes:
On Monday, 26 May 2025 at 09:49:54 UTC, Ferhat Kurtulmuş wrote:
 It is so lovely to see you improving and keeping the serverino 
 alive. I understand that one can update the server executable 
 without having to shut the entire thing down. Please correct if 
 I am wrong. Even though I haven't been doing web stuff 
 recently, it is my go-to solution when I need it because 
 Serverino is relatively lightweight. Please keep up the good 
 work. I hold an Aperol Spritz for the good work of you :)

 Ferhat
Thank you ferat! The encouragement from the community is always greatly underrated. :) And yes, you're right. And since you're not shutting down the entire thing, every request will be completed. Even with `wrk` or `bombardier` sending thousands of request per second, hot reload works fine. Andrea
May 26
prev sibling next sibling parent reply aberba <karabutaworld gmail.com> writes:
On Saturday, 24 May 2025 at 16:50:02 UTC, Andrea Fontana wrote:
 Hi everyone,

 I've just released serverino 0.7.17, with several improvements. 
 Here are a couple of highlights:

 [...]
Really interesting hot reload implementation
May 27
parent reply aberba <karabutaworld gmail.com> writes:
On Tuesday, 27 May 2025 at 11:54:34 UTC, aberba wrote:
 On Saturday, 24 May 2025 at 16:50:02 UTC, Andrea Fontana wrote:
 Hi everyone,

 I've just released serverino 0.7.17, with several 
 improvements. Here are a couple of highlights:

 [...]
Really interesting hot reload implementation
In a production environment, how do you handle deployment without killing ongoing requests?
May 27
parent reply Andrea Fontana <nospam example.com> writes:
On Tuesday, 27 May 2025 at 11:58:37 UTC, aberba wrote:
 On Tuesday, 27 May 2025 at 11:54:34 UTC, aberba wrote:
 On Saturday, 24 May 2025 at 16:50:02 UTC, Andrea Fontana wrote:
 Hi everyone,

 I've just released serverino 0.7.17, with several 
 improvements. Here are a couple of highlights:

 [...]
Really interesting hot reload implementation
In a production environment, how do you handle deployment without killing ongoing requests?
Exactly in this way. Just deploy the new executable and restart workers sending a SIGUSR1 signal to daemon. That's it. Workers will be restarted softly without any hiccup. Andrea
May 27
parent Andrea Fontana <nospam example.com> writes:
On Tuesday, 27 May 2025 at 15:06:14 UTC, Andrea Fontana wrote:
 In a production environment, how do you handle deployment 
 without killing ongoing requests?
Exactly in this way. Just deploy the new executable and restart workers sending a SIGUSR1 signal to daemon. That's it. Workers will be restarted softly without any hiccup. Andrea
The situation is more complicated if you also want to restart the daemon due to a configuration change or a code update in daemon. In that case, since serverino usually runs under nginx, it's better to start another instance of serverino on a different port and use nginx to redirect requests to the new process without any loss. In any case restart of serverino it's really quick! Andrea
May 27
prev sibling parent bauss <jacobbauss gmail.com> writes:
On Saturday, 24 May 2025 at 16:50:02 UTC, Andrea Fontana wrote:
 Hi everyone,

 I've just released serverino 0.7.17, with several improvements. 
 Here are a couple of highlights:

 **Hot reload just got smarter.**
 You can now gracefully reload all workers without losing any 
 active or queued requests. This means you can deploy updated 
 worker code and have it take effect *immediately without 
 interrupting your server*.

  * On POSIX systems, send SIGUSR1 to the server process: `kill 
 -SIGUSR1 <server_pid>`

  * On Windows, serverino watches for a temporary canary file — 
 just delete it to trigger a reload.

 Even better: if you enable config.enableWorkersAutoReload(), 
 serverino will automatically restart workers whenever the 
 executable is recompiled, again without interrupting any 
 in-flight requests. Watch auto-reload in action in this [video 
 on youtube](https://www.youtube.com/watch?v=708oeTiifMw).

 **KQueue is now the default backend on macOS.**
 It has been available for a while on both macOS and Linux, but 
 it's now officially the default on macOS (on linux *epoll* is 
 set as default backend)

 Fastest way to test serverino:
 ```
 dub init -t serverino blah
 cd blah
 dub
 ```

 More info, docs, examples on 
 [github](https://github.com/trikko/serverino)


 Andrea
Thank you for your hard work
May 27