260 likes | 409 Views
Scalable Web Architectures with Ruby and Amazon S3. or: what we learned building SlideShare. jonathanboutelle.com. Scalability?. Cheap hardware for parallelizable tasks. Parallelizing web serving. Load Balancer ($$$). Web Server. Web Server. Web Server. Sessions?. Client. 2.
E N D
Scalable Web Architectureswith Ruby and Amazon S3 or: what we learned building SlideShare
Parallelizing web serving Load Balancer ($$$) Web Server Web Server Web Server
Sessions? Client 2 Load Balancer ($$$) Web Server Web Server Web Server 1 cache cache cache 4 DataBase 3
Scaling a Rails Boxen Web Server App Server cache
LightHttp Mongrel Mongrel Mongrel cache
LightHttp Pound Mongrel Mongrel Mongrel cache
LightHttp Pound Mongrel Mongrel Mongrel backgroundrb cache
LightHttp Pound Mongrel Camping Mongrel Camping Mongrel Camping backgroundrb cache
LightHttp monit Pound Mongrel Camping Mongrel Camping Mongrel Camping backgroundrb cache
Asynchronous Processing File Processer dbase File Processor … job2 job2 job1 File Processor
Database reads ;-> master Write Write / Read writes slave1 Read writes X 1:OK 2:OK 3: Down slave2 writes
Database reads ;-> master cache Write Write / Read writes slave1 Read writes X 1:OK 2:OK 3: Down slave2 writes
Database writes ;-> master cache writes Write Write / Read slave1 Read writes X 1:OK 2:OK 3: Down slave2 writes
Database writes ;-< Master 1 Master 1 slave1 slave2 slave1 slave2
MySQL Clustering Box 1 Mirror 1 Box 2 Mirror 2
Serving Static Files cache proxy cache cache
Saving Static Files Data 1 A B proxy Data 2 A C Data 3 B C
S3! • What is it • scaling (technically) • scaling (economically)
Cash Flow • 1st of the month – AMZN Bill • 22nd of the month – Google AdWords Payment • 28th of the month –Credit Card Bill
Things to google… • Mongrel • Monit • LightHttp • Pound / Pen • Nagios • MogileFS