L5 LargeScaleWebApps
L5 LargeScaleWebApps
Web
Prof.P.V.Sudha,
Professor & Head,Applications
Dept. of CSE, UCEOU,
Director, CoE in AIML, Osmania University
Web Application
Architecture Web Server
Web A
/ pplication Storage
Browser server System
HTTP
LA
Intern
N
et
2
Large-Scale: Scale-Out
Architecture Web
Web Servers Storage
Browser System
HTTP
LA
Intern
N
et
3
Scale-out architecture
● Benefits of scale-out
○ Can scale to fit needs: Just add or remove instances
○ Natural redundancy make tolerating failures easier: One instance
dies others keep working
● Uses:
○ Load balancing - Forward requests to collection of front-end web
servers
○ Handles front-end web servers coming and going (dynamic pools
of server)
■ Fault tolerant - web server dies the load balance just quits
using it
○ Handles some simple request - static files, etc.
○ DOS mitigation - request rate limits
●
Scale-out assumption: any web server
will do
● Stateless servers make load balancing easier
○ Different requests from the same user can be handled by different
servers
○ Requires database to be shared across web servers
Memcache 20
● Examples:
Amazon EC2
Microsoft Azure
Google Cloud
Many others
Cloud Computing Advantages
● Key: Pay for the resources you use
○ No upfront capital cost
○ Need 1000s machines right now? Possible
○ Perfect fit for startups:
■ 1998 software startup: First purchase: server machines
■ 2012 software startup: No server machines
● If you don't need the full generality of virtual machines you can use
some already scalable platform.
○ Don't need to manage OSes: Container systems like
Docker/Kubernetes
■ Specify programs and dependencies that run as a process
○ Don't need to manage storage - Cloud database storage
■ Let the cloud run the database
○ Don't need to manage instances/load balancing:
Serverless
■ Let the cloud run the scale-out compute
infrastructure
Cloud Database
● Rather than running database instances - Use cloud
Storage
run databases
○ Cloud provider has experts at running large scale systems
● Features:
○ High Available
○ High Performance
○ Global replication and region containment
○ Consistency
○ Security
○ Usage based pricing
Serverless approach: Amazon
Lambda
● You provide pieces of code, URLs associated with each
piece of code
● Examples:
○ Amazon Lambda Functions
○ Microsoft Azure Functions
○ Google Cloud Functions