The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
31–40 of 42 posts
Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#32Earlier quoted context omitted.
Absolutely. At theconversation.edu.au we run a content site—we publish the news, which is the same for everyone. This means we can cache the front page and all the articles as static HTML, and then annotate the page with user info for signed-in commenters, editorial controls for signed-in editors, and so on. (We have a separate cookie that is present for signed-in users, so the fronted knows whether it should fire th…
Interested in what you mean by annotating the page after caching it, do you have any more info on this?
Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#33"We didn’t have any page caching in place at all." Cache me if you can! If you're a high-traffic site and you are not caching static content (I recommend Varnish highly), then your are throwing money or good user experience out the window.
When you say static content, do you mean actual static content, or dynamic-but-still-kind-of-static? Actual static content like CSS files and background images doesn't get any benefit from varnish. Something like the HN front page, where it is dynamic but consistent for all users at a specific point in time, is what you need to put behind varnish.
Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#34A few questions: 1. Is it possible to spin up two apps on Heroku? 2. What load balancers are available with the above? 3. Anyone have a link to a run down of how to back up your Postgres DB periodically? Thanks
http://michaelvanrooijen.com/articles/2011/06/01-more-concur...
Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#35Earlier quoted context omitted.
If you don't mind me asking, what load balancer are you using? I'm trying to setup multiple app servers on EC2 behind ELB using Redis as a session_store and I can't get sessions to persist.
I used to use ELB, but later I migrated the whole app to a self-hosted private cloud on a dedicated server. I'm using Nginx as the load balancer, and there're no session problems for me because I use the built-in secure cookie store.
Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#36Earlier quoted context omitted.
Well, it's true that database isn't horizontal-scaling-ready as described in the OP. But for many web apps, the database is not the bottleneck. Efforts should be spent on memory caching and NoSQL long before vertical scaling generates diminishing returns. Of course, it's easy to add a master-slave replication to a single database instance when the need arises, even possible without downtime. So I assume most RDBMSs t…
>But for many web apps, the database is not the bottleneck. Really? I think the database is usually the bottleneck in most web apps. That's why you cache data: to avoid hitting the database.
Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#37This is almost exactly how I deployed NameTerrific ( https://www.nameterrific.com ). It automatically gets ready for any horizontal scaling in the future. In addition, I allocate the workers to their own instances so that they can grow independently. Also I use Capistrano to automate deployment. Whenever additional resources are needed, simply clone the instance and add it to the load balancer. I use 2 Nginx workers…
If you don't mind me asking, what load balancer are you using? I'm trying to setup multiple app servers on EC2 behind ELB using Redis as a session_store and I can't get sessions to persist.
Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#38Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#39"We didn’t have any page caching in place at all." Cache me if you can! If you're a high-traffic site and you are not caching static content (I recommend Varnish highly), then your are throwing money or good user experience out the window.
The key thing I got a bit wrong was high-traffic mostly static "content", vs high-traffic "very custom" which is a) what I was used to at envato and b) what I thought we had on our hands at goodfilms. I think in a growing site with a lot of custom per-user content (like a social network) the extra complexity of a cache layer and managing expiry is more pain than it's worth while iterating the product quickly. If you'…
https://github.com/orslumen/record-cache
If you're on Django I think cache-machine does the same thing. There are some things you won't get cached this way that you could manually (functions and procedures), but I think they're both conservative enough that you won't return stale resources.
Re: The Minimum Viable Rails Stack, Now Reddit Frontpage Approved
#40Earlier quoted context omitted.
Interested in what you mean by annotating the page after caching it, do you have any more info on this?
Essentially talking about edge side includes [ http://en.wikipedia.org/wiki/Edge_Side_Includes ].