Web scale architecture design

  • 475 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
475
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
21
Comments
0
Likes
5

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Web Scale Architecture designJames Singh1
  • 2. Who is this targeted at?Mostly Tech StartupsIf you own a tech startup with brilliant idea and execution,chances are that your startup will catch up like fire.- Initial traffic from TNW, TechCrunch, HackerNews etc.- Huge organic trafficIf you’re not prepared, bad things will happen.2
  • 3. DeliverablesWe’ll go through iterative process building ascalable[1] architecture for a website that we’llbe launching (hypothetically) in sometime.“Scalability is the ability of a system, network, or process to handle a growingamount of work in a capable manner or its ability to be enlarged toaccommodate that growth.”- Wikipedia3
  • 4. It all starts with the launchMinimum Viable Product running on the following:1. Amazon EC2 instance2. MySQL database4
  • 5. Oops! You’ve hit the wall- The server is showing 100% CPU Utilization. Needmore resources.- Vertical scaling gives you sigh of relief.5
  • 6. Vertical Scalability ???Increasing the hardware resources without changing the numberof nodes. Also known as "Scaling up" the server.Advantages:- Simple to implementDisadvantages:- Finite limit- Requires downtime6
  • 7. Houston, we have a problem!7
  • 8. Horizontal scalingIncreasing the number of nodes of the App server through loadbalancing. Also referred to as "Scaling out" the app server.- Increase in the number of nodes by replacing the nodes.- Each node performs the same tasks.- Each node is identical.8
  • 9. 1. Multiple AWS instances + Auto scaling2. Elastic load balancing (ELB) / nginx3. MySQL (master + slaves)9
  • 10. Doing good. Let’s work on performance1. Not hitting the application server for static content[Performance]2. Take advantage of Content Delivery Networks (CDNs),which copy the static assets to servers around the world[Speed].3. Render on the client side using templates. Return datafrom server, as JSON/XML etc, rather than HTML.[Performance+speed]4. Returning compressed data from server. [Speed]5. Caching data instead of hitting database every time[Performance + Speed]10
  • 11. Our latest setup1. Multiple AWS instances + Auto scaling2. Elastic load balancing (ELB) / nginx3. MySQL (master + slaves)4. CDN / CloudFront / Akamai5. Memcached11
  • 12. The database crunch!The db has grown to the extent that a single machinecannot hold all data.Solution: NoSQLData spanning across multiple disks.Options: MongoDB, Cassandra, Redis, CouchDB, Hbase,Riak12
  • 13. Minimum viable setup??1. Multiple AWS instances + Auto scaling2. Elastic load balancing (ELB) / nginx3. CDN / CloudFront / Akamai4. Memcached5. MongoDB13
  • 14. References1. http://www.slideshare.net/directi/building-a-scalable-architecture-for-web-apps2. http://highscalability.com/blog/2013/4/15/scaling-pinterest-from-0-to-10s-of-billions-of-page-views-a.html3. http://architects.dzone.com/news/scalable-system-design-014
  • 15. Questions?15