HACKER Q&A
📣 goatking

Do you know any good web framework performance comparisons?


I am trying to create a new website, and decided to go with a framework which renders on server side. I don't want to use any React/Angular or similar frontend frameworks.

Currently I am looking at these frameworks:

- Django + HTMX

- Ruby on Rails

- Elixir + Phoenix

I haven't used any of these in production yet. I am trying to find some information on the performance of these frameworks, the scalability, how much hardware they need, etc. I also wanna see how much TPS they can handle on the same hardware (CPU/Memory) with similar access patterns.

Does anyone know any good posts/websites that does a detailed comparison? I am having trouble finding any good analysis that actually makes sense...

(I would love to go with Elixir + Phoenix, but after some research I realized the library support is nowhere near to Python/Ruby. But I am a bit worried about performance if I go with Django or Rails. I want to spend as few dollars on hardware as possible.)


  👤 bell-cot Accepted Answer ✓
> ...trying to create a new website...

Guessing that massive web traffic will (at best) be kinda far in your future - how useful are metrics such as TPS here?

I'd pick based on the resources needed to set up & manage your ops side, developer productivity, time to market, and such. With a veto on that winner possible, if its performance is seriously bad.


👤 nomilk
Something I'd probably do is make a very basic app (e.g. 'todo' app) in each framework, deploy all 3 to heroku, and check out the 'metrics' tab. For a few hours' work, that should give a rough idea of CPU and memory, at least for a very small app.

One other thing:

> I want to spend as few dollars on hardware as possible.

This is a perfectly sensible objective, but always keep in mind any trade offs between development time and server costs. Sometimes less efficient frameworks are faster to develop in, and it can be worth suffering a slightly greater server bill to get an MVP out quickly, especially if the server bill is small to begin with.


👤 metaloha
Ruby is traditionally quite heavy compared to Python and PHP, similar to Java and ColdFusion, though that is likely less a problem these days. I personally have found Flask (Python) to be super lightweight and still has a great ecosystem of libraries and packages.

For the final word in web speed, though, G-WAN - write your code in C and feel the lightning ;)