Hi everyone,
I’m trying to understand why an HTTP::Server consumes at least 400mb of memory.
Here is an example of an HTTP server that consumes 411mb of memory just by being started.
I would like to know if there is any way to reduce memory consumption because I have a project that starts several servers on the same server and this will cost me many gigabytes of memory.
Example:
require "http/server"
server = HTTP::Server.new do |context|
context.response.content_type = "text/plain"
context.response.print "Hello, World!"
end
address = "0.0.0.0"
port = 8080
puts "Listening on http://#{address}:#{port}"
server.bind_tcp(address, port)
server.listen
Memory usage:
Thanks.