Web application architecture
Client-server model
Request services as client, server provides response. The request-response cycle repeats.
multi-page apps
Multiple pages loaded separately. When new pages accessed, browser sends request to server, which returns a new page for the request.
Advantage of multi-page apps (MPA)
Negative of MPA?
More server load (each new page means a new request) so slower navigation (slow to wait for page to load)
single page applications (SPA)
Front-end loaded initially in entirety and further interactions are handled without full-page reloads (dynamic content updates). Updates happen by making API calls to back-end.
E.g. Google maps - each scroll
Is new content, only content updates not whole page
Advantages of SPA
Faster user experience
Reduced server load
Disadvantages of SPA
SEO challenges (as whole front end loaded at once) and so initial load times can be high
Monolithic architecture
Single indivisible unit
Components are interconnected (database and backend are tightly coupled)
(One big system)
Pros and cons of monolithic architecture
+Simpler to develop and deploy, easier debugging
-Scalability issues (harder to update and maintain)
Micro services architecture
Small independent services that communicate via APIs
Pros and cons of micro services architecture
+Scalability and flexibility (using different technologies to complete tasks and it all working cohesively)
- Complex to manage and deploy
DNS
DNS provides a distributed database we can query for the IP address
Front-end technology
Back-end technologies
Database management
RESTful API architecture
Styled for designing networked applications.
Stateless, resource-based interactions
Deployment
Deployment environments
Deployment models
Deployment costs
Metrics
Response time
latency
throughput
Used to analyse performance of good apps
Scaling and performance
Types of scaling: Horizontal (more machines), Vertical (increase power of machines)
Performance optimisation: caching, load balancing (distributed load across two or more server)