|
|
|
|
|
by MattStopa
4708 days ago
|
|
The main thing you need to do in order to prevent scaling issues are making sure you aren't making an absurd amount of queries per page request. I once worked on a project that was taking close to 10 seconds at scale. Turns out it was making close to 1000 DB queries per request because they were doing iterative logic and making 3-4 db calls per iteration (which was also being done in the view...) I moved it all into the controller and it was sub 1 second, and had about 80 queries left over. This is actually very common to see in Rails apps, even with some of the more prestigious consultancies out there. If you avoid doing things that absolutely won't scale you will be fine. Rails has no issues scaling, for 99.9% of the use cases. Regardless of the framework you use you will still have plenty of scaling issues if you have Twitter/Facebook level of success. But again that is a great problem to have. |
|