Class: Rage::Configuration::Server
- Inherits:
-
Object
- Object
- Rage::Configuration::Server
- Defined in:
- lib/rage/configuration.rb
Instance Attribute Summary collapse
-
#max_clients ⇒ Integer
Limit the number of simultaneous connections the server can accept.
-
#port ⇒ Integer
Specify the port the server will listen on.
-
#timeout ⇒ Integer
Specify the connection timeout in seconds.
-
#workers_count ⇒ Integer
Specify the number of worker processes to spawn.
Instance Attribute Details
#max_clients ⇒ Integer
Decreasing this number is almost never a good idea. Depending on your application specifics, you are encouraged to use other methods to limit the number of concurrent connections:
-
If your application is exposed to the public, you may want to use a cloud rate limiter, like Cloudflare WAF or Fastly WAF.
-
Otherwise, consider using tools like Rack::Attack or connection_pool.
Limit the number of simultaneous connections the server can accept. Defaults to the maximum number of open files.
358 |
# File 'lib/rage/configuration.rb', line 358 attr_accessor :port, :workers_count, :timeout, :max_clients |
#port ⇒ Integer
Specify the port the server will listen on.
358 359 360 |
# File 'lib/rage/configuration.rb', line 358 def port @port end |
#timeout ⇒ Integer
Specify the connection timeout in seconds.
358 |
# File 'lib/rage/configuration.rb', line 358 attr_accessor :port, :workers_count, :timeout, :max_clients |
#workers_count ⇒ Integer
Specify the number of worker processes to spawn. Use -1 to spawn one worker per CPU core.
358 |
# File 'lib/rage/configuration.rb', line 358 attr_accessor :port, :workers_count, :timeout, :max_clients |