Web Applications Flashcards
Client tier
Client tier is composed by:
* Web clients: HTML + Javascript
* Mobile apps: Android, iOS, etc
Application tier
Application tier is composed by:
* REST servers
* Static and dynamic web pages
* Popular application servers
* E.g.: Tomcat, Wildfly, ASP.NET, etc
Data tier
Data tier is composed by:
* Filesystems, BLOB stores, key-value stores, SQL databases, etc.
* Other services: caches, message queue, etc.
Why multiple instances of web apps?
- A single server might not be sufficient to handle all client
requests; - A single server is a single point of failure: if it fails the
service becomes unavailable; - A single server may be too far from some clients: latency
too high.
Insuffient, failure, latency
What is simplicfied by having multiple instances?
No internal state in server (state is maintained in the data tier)
App service
handles HTTP/REST requests.
database/storage
durability
cache
improved performance in the servers
CDN
reducing load time and save bandwidth
How to avoid downtime in deploying new versions? (Staging)
Basic approach:
1. Keep the old version running;
2. Deploy the new version to a staging slot (using Azure
terminology) – instances are created but requests from
clients keep being processed by the old version;
3. (Optionally) warm-up application;
4. Hotswap from the old to the new version, by start
forwarding client requests to the new version.