2. Who is this targeted at?
Mostly Tech Startups
If 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 traffic
If you’re not prepared, bad things will happen.
2
3. Deliverables
We’ll go through iterative process building a
scalable[1] architecture for a website that we’ll
be launching (hypothetically) in sometime.
“Scalability is the ability of a system, network, or process to handle a growing
amount of work in a capable manner or its ability to be enlarged to
accommodate that growth.”
- Wikipedia
3
4. It all starts with the launch
Minimum Viable Product running on the following:
1. Amazon EC2 instance
2. MySQL database
4
5. Oops! You’ve hit the wall
- The server is showing 100% CPU Utilization. Need
more resources.
- Vertical scaling gives you sigh of relief.
5
6. Vertical Scalability ???
Increasing the hardware resources without changing the number
of nodes. Also known as "Scaling up" the server.
Advantages:
- Simple to implement
Disadvantages:
- Finite limit
- Requires downtime
6
8. Horizontal scaling
Increasing the number of nodes of the App server through load
balancing. 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
10. Doing good. Let’s work on performance
1. 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 data
from 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
12. The database crunch!
The db has grown to the extent that a single machine
cannot hold all data.
Solution: NoSQL
Data spanning across multiple disks.
Options: MongoDB, Cassandra, Redis, CouchDB, Hbase,
Riak
12