Need advice about which tool to choose?Ask the StackShare community!
Mongoose Web Server vs Puma: What are the differences?
What is Mongoose Web Server? The most easy to use web server on the planet. Mongoose is built on top of Libmongoose embedded library, which can turn anything into a web server in 5 minutes worth of effort and few lines of code. Libmongoose is used to serve Web GUI on embedded devices, implement RESTful services, RPC frameworks (e.g. JSON-RPC), handle telemetry data exchange, and perform many other tasks in various different industries including aerospace, manufacturing, finance, research, automotive, gaming, IT.
What is Puma? A Modern, Concurrent Web Server for Ruby. Unlike other Ruby Webservers, Puma was built for speed and parallelism. Puma is a small library that provides a very fast and concurrent HTTP 1.1 server for Ruby web applications.
Mongoose Web Server and Puma can be primarily classified as "Web Servers" tools.
Mongoose Web Server and Puma are both open source tools. Puma with 5.78K GitHub stars and 987 forks on GitHub appears to be more popular than Mongoose Web Server with 5.51K GitHub stars and 1.61K GitHub forks.
I have an integration service that pulls data from third party systems saves it and returns it to the user of the service. We can pull large data sets with the service and response JSON can go up to 5MB with gzip compression. I currently use Rails 6 and Ruby 2.7.2 and Puma web server. Slow clients tend to prevent other users from accessing the system. Am considering a switch to Unicorn.
Consider trying to use puma workers first. puma -w
basically. That will launch multiple puma processes to manage the requests, like unicorn, but also run threads within those processes. You can turn the number of workers and number of threads to find the right memory footprint / request per second balance.
Pros of Mongoose Web Server
- Light weight1
- Easy to configure1
- Web server1
Pros of Puma
- Free4
- Convenient3
- Easy3
- Multithreaded2
- Consumes less memory than Unicorn2
- Default Rails server2
- First-class support for WebSockets2
- Lightweight1
- Fast1
Sign up to add or upvote prosMake informed product decisions
Cons of Mongoose Web Server
Cons of Puma
- Uses `select` (limited client count)0