What is a web application?
A web application is interactive software that runs on servers and is used through a web browser, from online shops and booking systems to dashboards and collaboration tools.
How does it differ from a website?
By interaction and state. A brochure website mostly delivers the same pages to everyone. A web application lets each user log in, enter data, change things and see results specific to them, which means it stores state in a database and runs logic on every request. The line blurs, since many sites have application features, but the distinction matters for hosting: applications need more compute, a database and careful handling of user data.
Which layers make up a web application?
| Layer | Runs where | Common technologies |
|---|---|---|
| Front end | The browser | HTML, CSS, JavaScript, frameworks such as React, Vue or Svelte |
| Web server or proxy | Your server | NGINX, Caddy, Apache |
| Back end | Your server | PHP, Python, Node.js, Go, Java, Ruby |
| Data | Your server or a separate one | PostgreSQL, MySQL, Redis or Valkey, object storage |
| Background jobs | Your server | Queues and workers for email, exports, image processing |
What happens when a user clicks a button?
A request travels through each layer and back. The browser sends an HTTP request over TLS; the web server terminates TLS and passes the request to the application; the application checks the session, runs business logic, reads or writes the database and perhaps queues a background job; then it returns HTML or JSON, which the browser renders. Every step adds latency, so a fast application keeps database queries few and indexed, caches what it can and moves slow work to the background.
Which architectures are common?
A monolith, a monolith with services around it, or microservices. A single well-structured application with one database is the simplest to build, deploy and debug, and serves very large traffic on good hardware. Splitting out a few services, such as search or media processing, follows when parts need different scaling. Full microservices suit large organisations with many teams. Our Microservices architecture article discusses when that complexity pays off. Server-rendered pages and single-page applications are both valid front-end choices; many frameworks now mix the two.
How does a web application scale?
In steps, measured at each one. First, optimise queries and add caching. Second, move the database to its own machine with enough memory. Third, run two or more application servers behind a load balancer, keeping them stateless with sessions in Redis or Valkey. Fourth, add read replicas and offload static files to a content network. Most applications never need to go beyond the third step. Our Load balancing and Database server articles cover steps two and three.
How do I host one on a dedicated server?
Install the runtime, a reverse proxy and the database, run the application as a service, and automate deployment. A systemd unit keeps the application running and restarts it after failures:
[Unit] Description=Booking app After=network-online.target postgresql.service [Service] User=booking WorkingDirectory=/srv/booking/current EnvironmentFile=/etc/booking/env ExecStart=/srv/booking/current/venv/bin/gunicorn -w 9 -b 127.0.0.1:8200 booking.wsgi Restart=on-failure [Install] WantedBy=default.target
NGINX in front handles TLS and static files and proxies the rest to port 8200 on loopback. Our Web server article explains that front layer, and Install a LAMP stack shows a PHP stack.
What security basics apply?
HTTPS everywhere, server-side authorisation checks on every request, parameterised database queries, secure session cookies, rate limits on login and patched dependencies. Keep the database and cache bound to loopback or a private tunnel, and back up the database and uploaded files to another server. Our Application security article covers the common flaws in depth.
What size of server does it need?
Usually a modest machine at launch. A typical application with a few thousand daily users runs comfortably on ESSENTIAL-1, with 6 and 32 GB DDR4, for $38.40 a month. Busier applications with heavy database work move to BUSINESS-2 2024, and large ones split across several machines. All include DDoS filtering, which protects the public port against floods. Our High-traffic websites and E-commerce shops pages give more sizing detail.
Machines for web applications
| Model | Processor | Cores | Memory | Drives | Port | Per month |
|---|---|---|---|---|---|---|
| ESSENTIAL-1 | Intel Xeon-E 2386G | 6 | 32 GB | 2x 512 GB SSD NVMe | 1 Gbps unmetered | $38.40 |
| ESSENTIAL-3 | AMD Ryzen 9 5900X | 12 | 32 GB | 2x 512 GB SSD NVMe | 1 Gbps unmetered | $61.20 |
| BUSINESS-2 2024 | AMD EPYC 4344P | 8 | 64 GB | 2x 960 GB SSD NVMe | 3 Gbps unmetered | $109.80 |
| BUSINESS-4 2026 | AMD EPYC 4585PX | 16 | 64 GB | 2x 960 GB SSD NVMe | 3 Gbps unmetered | $212.40 |
Related pages
High-traffic websites
Machines with fast cores and guaranteed 3 to 5 Gbps ports for news sites, forums, APIs and busy content platforms.
Read moreApplication security
Keeping the software you deploy safe: common vulnerability classes, secure coding habits, dependency hygiene, testing and runtime defences on your own server.
Read moreMicroservices architecture
Splitting an application into small independent services: benefits, the costs people underestimate, communication patterns, data ownership and running them on bare metal.
Read moreNGINX
The event-driven web server and reverse proxy explained: how workers handle connections, common configuration blocks, TLS, caching and tuning on bare metal.
Read moreQuestions and answers
When does a website become a web application?
When it lets users log in, enter data and get personalised results, which requires server logic and a database.
Which server do I need for a small web application?
A compact machine with 6 to 8 cores and 32 GB of memory runs the application, web server and database together for thousands of daily users.
Should the database be on a separate server?
Not at first. Move it to its own machine when database load competes with the application or when you add more application servers.
How do I keep a web application running after crashes?
Run it as a systemd service with automatic restart, behind a reverse proxy, and add external monitoring that alerts when it stops answering.
Is a monolith or microservices better for a new application?
A well-structured monolith is usually better at the start. It is simpler to build and run; split out services later where there is a clear need.