Web service architecture
The chain that serves a site: web server, virtual hosts, reverse proxy, application server, database, TLS termination and logs, in two and three tiers.
- 27 cards
- 5 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- On the diagram
- Scenarios
A few cards from the deck
Virtual host: what is it?
Show the answer
A configuration that lets one server serve several sites, choosing the content from the name requested.
The name comes from the Host header in HTTP; in HTTPS it is already known when the connection opens thanks to the SNI extension, which lets the server pick the right certificate.
Which block answers an HTTPS request carrying "Host: wiki.example.org"?
```text
server { listen 443 ssl; server_name www.example.org; }
server { listen 443 ssl; server_name intranet.example.org; }
server { listen 443 ssl default_server; server_name _; }`- The third, which is the default server
- The first, the closest to the name requested
- The second, because it is written right after
- None: nginx returns a 404 error
Show the answer
The third, which is the default server
nginx compares the requested name with the server_name values. None matches wiki.example.org: the block marked default_server answers, not the most similar one.
In nginx, the … directive picks the block from the Host header, and … passes the request on to the application.
Show the answer
In nginx, the server_name directive picks the block from the Host header, and proxy_pass passes the request on to the application.
Both appear in almost every reverse proxy configuration: one selects the site, the other names the upstream.
Reverse proxy: what is it?
Show the answer
A server placed in front of other servers: it receives clients' requests and passes them on to the one that must answer.
It acts on behalf of the servers, whereas a forward proxy acts on behalf of the clients. It also spreads load, caches and centralises TLS.