web applications architecture Flashcards
what is web applications architecture
a framework that defines interactions between different components of a web application
what are the 3 components of a web application
front end; client side
back end; server side
database
front end
handles user interface and experience
back end
processes business logic, handles data storage and interacts with the db
database
stores and manages application data
what is the primary function of web servers
deliver web pages to networked clients
what do webservers do
they are software that take a request in http format for a resource over a network then serves it back to the client as a payload to a http response
request response cycle
client request, the server processing and the response delivery
how does the client server model work
client requests data and services from the server
server processes requests and returns the appropriate response
what is the role of http in the client server model
protocols the facilitate the interaction
what are the four main types of web application architecture
monolothic
micro services
single and multi page applications
monolithic architecture
a single indivisible unit with all components interconnected
the backend front end and db are tightly coupled
how does the server and client interact in a monolithic architecture
the server sends complete html pages to the client for every user request
+ monolithic architecture
simpler to develop and deploy
easier debugging
– monolithic architecture
scalability issues; harder to update and maintain
microservices architecture
small independent services that communicate via apis
+ microservices architecture
scalability and flexibility in using different technologies
– microservices architecture
complexity in management and deployment
single page applications
the entire front end is uploaded initially and subsequent interactions happen without full page reloads
how is content updated in single page applications
by making api calls to the backend
+ single page applications
faster user experience and reduces server load
– single page api
search engine optimisation (seo) challenges; initial load time can be high
multi page applications
multiple pages each loaded separately from the server
how do multi page applications work
when users navigate to different pages the browser sends a request to the server which returns a new html page for each request
– multi page applications
more server load
slower navigation compared to single page
+ multi page applications
better for seo; easier to maintain certain types of applications
what is a web page made up of
has a base html file including several referenced objects
examples of objects in html
html file
jpeg image
audio/video file
front end technologies
html
css
javascript
html
structures the content on the webpage
css
styles and visually formats the content
javascript
adds interactivity and dynamic features
modern front end frameworks
streamline development and manage complex ui states
backend technologies
server side languages; e.g. java python
webservers
APIs;RESTful
webservers
serve webpages to users
APIs
services that allow communication between the front and backend
deployment
making an app available for use on a server
what are the 3 parts of the deployment environment
deployment, production and staging environment
deployment environment
local machines where developers write and test code
production environment
the live environment where the product is available to users
staging environment
a replica of the production environment used for final testing
what are the 3 types of deployment models
on premises
cloud based
hybrid
on premises deployment model
hosting the app on physical servers owned and managed by the organisation
cloud based deployment model (+ what benefits does it offer)
using cloud services to host the app offering scalability and reducing operational overhead
hybrid deployment model
on premises and cloud based
what are the 3 cost considerations in deployment
initial cost; setup and deployment (including server and cloud costs)
ongoing costs; maintenance, scaling, monitoring
optimisation; using autoscaling and pay-as-you-go models to optimise costs
what are some performance metrics and explain them
response time; time for the server to process a request and send a response
latency; delay between client request and servers initial response
throughput; number of requests successfully handled within a given time frame
error rate
availability
security
resource utilisation
scalability
the ability of an app to handle increasing loads and maintain performance goals
horizontal scaling
adding more machines to handle load
complicates all scenarios except the simplest
vertical scaling
increasing the power of existing machines
+ vertical scaling
more machines can get expensive
nothing changes drastically
what are two forms of performance optimisation
load bearing
caching
load balancing
distributing the load evenly across two or more servers
caching
exploits locality by moving content closer to the user
in which places can caching be done
in browser network or server
why does caching work
less hops means less latency
less congestion
what is a positive and negative of load balancing and how does it work with hardware
higher performance and cost
rewrites headers at layer four and adjusts the dns
there is a tcp connection between the client and server
how does load balancing with software work
echos http requests to particular servers
tcp connection between the client and balancer