Simple “KISS” rules to make one billion dollars
1. Instagram took 8 weeks to build, photo-sharing website. One year to get up and running
2. Small start-up (3 engineers), with many (proven) technologies .
3. They used Canonical Early start-up model
4. Service Oriented architecture is used
4. They sold company to “Facebook” for billion USD.
1. Amazon web services as cloud ( EC2)
- EC2 is “Elastic Cloud Computing” :
- You can buy computing power by hour
- You can bandwidth by GB
- You can buy space by GB/month
- You can add load balancer, firewall by click of mouse
3. Elastic load balancer with “3 Nginx” instance siting behind ELB. Here 100 of EC2 instances are used.
3. a : Nginx
(Nginx (pronounced “Engine-X”) is an open source Web server and a reverse proxy server for HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high concurrency, performance and low memory usage.
Aimed at solving the C10K problem of 10,000 simultaneous connections, nginx was written with a different architecture in mind—one which is much more suitable for nonlinear scalability in both the number of simultaneous connections and requests per second. nginx is event-based, so it does not follow Apache’s style of spawning new processes or threads for each web page request. The end result is that even as load increases, memory and CPU usage remain manageable. nginx can now deliver tens of thousands of concurrent connections on a server with typical hardware (Ref: 3)
In this diagram, two web browsers are requesting 3 different web sites, assuming there are three instances, ELB distributes the load (simple form of ELB, there may be many variations in ELB)
More on ELB
5. Gunicorn as their WSGI server.
A solution is to stop being a supermarket and start being Fry’s. When you checkout at Fry’s you wait in one long line. In front are thirty cash registers handling one person at a time. When a cashier finishes with a customer, they turn on a light above the register to signal they’re ready to handle the next one. It’s counterintuitive, but one long line can be more efficient than many short lines.(tweeter page)
6. 25+ Django App servers : Ref:
App Server used for Horizontal scaling
Amazon S3 is storage for the Internet. It is designed to make web-scale computing easier for developers.
Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives any developer access to the same highly scalable, reliable, secure, fast, inexpensive infrastructure that Amazon uses to run its own global network of web sites. The service aims to maximize benefits of scale and to pass those benefits on to developers.
9. Route 53:
Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service
Courtesy : Mark J
A typical website generally contains a mix of static content and dynamic content. Static content includes images or style sheets; dynamic or application generated content includes elements of your site that are personalized to each viewer. Amazon CloudFront can help improve performance of your entire website in the following ways:
12 : Redis
14: Apache Solr
Apache Solr is a fast open-source Java search server.
Solr enables you to easily create search engines which searches websites, databases and files.
is used to execute commands in parallel on all machines. A deploy takes only seconds.
PostgreSQL (users, photo metadata, tags, etc) runs on 12 Quadruple Extra-Large memory instances.
Final architecture from Rama’s blog:
The final architecture from Rama (How to make a billion dollars in a couple of years)