Rails makes it pretty easy to get started for development. You don't even have to setup your database. It comes with SQLite. Install Rails and you start the development.
Same with deploying to production. You need to change your database. Other than
that it comes with sane defaults. You don't really need to know what's
RAILS_MAX_THREADS
and what's WEB_CONCURRENCY
. However as your application
starts getting more traffic you want to scale your application.
Over the last 13 years of consultancy at BigBinary we have seen all types of applications.
We have seen Rails applications which are IO heavy like scraping websites. There are applications which are heavy on background jobs. Then there are flash sale sites where there is no traffic one minute and next minutes there is tons of traffic. Then there are ticketing sites.
Each application has its own challenges.
If an application is not properly tuned then we can run into all kinds of issues. You can run out of memory or database connections. In some cases because of the wrong configuration Sidekiq jobs were failing and these jobs continued to get enqueued which made the situation worse.
To solve all these types of issues we need to know underneath what's actually happening. And that's what we will do. We will look at under the hood to see how Rails works, how puma works, how connection pooling works, how to tune Sidekiq and how to measure what we need to know to make decisions.
It's a journey to understand from ground up how to scale Rails applications. This page will have links to all the future blogs. You can follow the Scaling Rails series by joining the newsletter or following us on twitter or LinkedIn. We even have an RSS feed.
load_async
affect the connection usage?ActiveRecord::ConnectionTimeoutError
If this blog was helpful, check out our full blog archive.