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
Per conversations on the discord, the most idiomatic way to spawn multiple services over multiple sockets is by following the current actix-http example using actix_server::Server.
This is preferred over the alternative of spawning more than one HttpServer as that results in each HttpServer spawning exclusive threads for themselves (e.g. 2 of them would spawn n*2 threads, where n is number of physical cores).
Expected Behavior
Current Behavior
However the example requires construction of an AppConfig whose only public constructor is its Default, which results in an incorrect configuration (server's hostname, address, and whether TLS is in use). This results in incorrect values for HttRequest's app_config, connection_info and maybe url_for methods and even possibly other things?
Possible Solution
Per @robjtede it's probable that this is a gap in the public interface. Either AppConfig needs an alternative constructor or possibly actix_server::Server or its builder could construct AppConfig from the values they have.
Steps to Reproduce (for bugs)
Context
Your Environment
Actix Web Version: 4.2
The text was updated successfully, but these errors were encountered:
Per conversations on the discord, the most idiomatic way to spawn multiple services over multiple sockets is by following the current actix-http example using
actix_server::Server
.This is preferred over the alternative of spawning more than one
HttpServer
as that results in eachHttpServer
spawning exclusive threads for themselves (e.g. 2 of them would spawn n*2 threads, where n is number of physical cores).Expected Behavior
Current Behavior
However the example requires construction of an
AppConfig
whose only public constructor is itsDefault
, which results in an incorrect configuration (server's hostname, address, and whether TLS is in use). This results in incorrect values forHttRequest
'sapp_config
,connection_info
and maybeurl_for
methods and even possibly other things?Possible Solution
Per @robjtede it's probable that this is a gap in the public interface. Either
AppConfig
needs an alternative constructor or possiblyactix_server::Server
or its builder could constructAppConfig
from the values they have.Steps to Reproduce (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: