We have a pretty sizable monolithic Rails app that has a few functions (in parenthesis is the estimated % out of the total codebase):
- Marketing site when users are not logged in: homepage, additional landing pages, SEO pages, registration/login pages, etc (5%)
- Logged in user facing pages: after logging in, users can see the web app and interact with our product (20%)
- Logged in admin facing pages: after loggin in, admins can use the integrated CMS to manage everything that users can see (75%)
Over time, the admin part of the site has grown to be much bigger than everything else. All of the above still lives in one single Rails app being hosted on one Heroku Performance-M dyno.
The problem is that a lot of the time, having high "admin" usage leads to slowing down the entire server, which affects non-admin users.
Because of this, we want to split the load into multiple Heroku web dynos, but we would like to keep a single Rails app, for simplicity and development speed.
What is the best way to go about this?
Thanks!
PS - I wasn't sure if Serverfault is the best place to post this... but it was really confusing to choose one. If I chose the wrong place to post, please let me know and I'll post there instead.