You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think actix had an attempt before at implementing hot reload, but deferred to using the default cargo watch instead. But, seriously, it's a bit unbearable how long it takes to compile, especially when you add more features to your server, ie. essentially a monolith-like server with job schedulers, etc. For now, I feel it's best to keep servers small and distributed, like microservices, since hot reloading takes forever when multiple features are on a single server. And, maybe rust actix servers shouldn't be built this way, and should just push compiling to multiple executables and rely on bash to fork execution of each server/services (for monolith, atleast, which also works when pivoting to microservices since the executables would already be separated). The only unfortunate downside is that each server, if run in a monolith, would have an independent Pool Connection Manager... I'm guessing there wouldn't be a way to communicate with each individual executable if the other executable is being starved or monopolized by another executable (honestly, Idk, how it would behave, just guessing what might be an issue if the connection manager isn't centralized to one executable while running monolith)
Most of the time, the sink is just on the bootstrap or server.start() op. It'd be nice if it only restarted the affected region of the code... but I don't know how to do that with Rust without investing a massive amount of time researching it. I don't really understand how Cargo Watch compiles, or how Rust compiles in debug mode/development environment... but if it had a DLL-like compilation where you can compile a certain section of the code, then replace only that section - that would be great. Then ofc use static build for prod.
This discussion was converted from issue #3835 on November 26, 2025 16:48.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I think actix had an attempt before at implementing hot reload, but deferred to using the default cargo watch instead. But, seriously, it's a bit unbearable how long it takes to compile, especially when you add more features to your server, ie. essentially a monolith-like server with job schedulers, etc. For now, I feel it's best to keep servers small and distributed, like microservices, since hot reloading takes forever when multiple features are on a single server. And, maybe rust actix servers shouldn't be built this way, and should just push compiling to multiple executables and rely on bash to fork execution of each server/services (for monolith, atleast, which also works when pivoting to microservices since the executables would already be separated). The only unfortunate downside is that each server, if run in a monolith, would have an independent Pool Connection Manager... I'm guessing there wouldn't be a way to communicate with each individual executable if the other executable is being starved or monopolized by another executable (honestly, Idk, how it would behave, just guessing what might be an issue if the connection manager isn't centralized to one executable while running monolith)
Most of the time, the sink is just on the bootstrap or
server.start()op. It'd be nice if it only restarted the affected region of the code... but I don't know how to do that with Rust without investing a massive amount of time researching it. I don't really understand how Cargo Watch compiles, or how Rust compiles in debug mode/development environment... but if it had a DLL-like compilation where you can compile a certain section of the code, then replace only that section - that would be great. Then ofc use static build for prod.Beta Was this translation helpful? Give feedback.
All reactions