POLAKO / Blog

Good practice · 23.11.2026

A portal that survives peak traffic: 6 good practices for classifieds and news sites

Classifieds and news portals share a similar architecture – and similar weak spots. Here are six things we check first, and how to fix them.

A typical modern portal looks like this: a fast frontend (often Next.js or a similar framework), an API underneath, and a database behind the API. Everything works great while traffic is normal. Trouble starts at peak – and almost always in the same places.

1. The API needs the same protection as the site

A common situation: the site sits behind a CDN and a firewall, but the API the browser talks to answers directly from the server. That server's address is visible in any browser's developer tools, so protecting the site doesn't help – all traffic, malicious included, can go straight to the API.

Fix: put the API behind the same CDN and firewall, and configure the server to accept traffic only from them. Add per-address rate limits.

2. Reference data shouldn't hit the database on every click

Lists of countries, cities and categories change rarely – sometimes once a year. Yet every visitor on every page often asks the API for them again, and the API asks the database again. Across thousands of visits that's tens of thousands of identical queries and gigabytes of identical data.

Fix: publish reference data as a static JSON file on the CDN and refresh it when it changes. One cached file instead of six database queries.

3. Reads should be GET, not POST

To avoid an extra CORS preflight, API calls are sometimes sent as POST even when they only read data. The catch: POST isn't cached – not by the browser, not by the CDN. An ETag on the response then does nothing.

Fix: use GET for reads with a clear Cache-Control header (e.g. reference data for an hour, listing pages for tens of seconds). Configure CORS once, properly, on the server.

4. Public HTML can be cached too

If the server returns Cache-Control: no-store for every page, the CDN keeps nothing but images and scripts. Every visit to a listing or news page renders it from scratch – and waits for the API and the database.

Fix: cache public pages (listings, ad details, articles) on the CDN for a short time with background refresh (stale-while-revalidate). Visitors get the page instantly; the server refreshes it once, not a thousand times.

5. Filters should work from the first second

When reference data loads only after JavaScript, filters stay empty for the first two or three seconds. The user clicks, nothing happens – and they leave.

Fix: embed reference data in the page on the server (or load it from the cached JSON), so filters work immediately.

6. Up-to-date software and automated releases

A server that publicly announces a web-server version several years old is asking for trouble – and is a sign that updates are rare and manual. The same goes for code shipped “when we get to it” and database migrations run from a terminal.

Fix: regular updates, hide the version from response headers, and a CI/CD pipeline that ships code and database migrations the same tested way. We wrote about migrations here.

How long it takes

Points 2 and 3 are usually a few days of work and cut database queries by a large share. Point 1 matters most for security. The rest is done in order, measured before and after.

All of this is visible without any access to your server – a browser's developer tools are enough. If you want to know where your portal stands, the Infrastructure Health Check takes 2–3 days.

Want to know where your site's limit is?

Audit from €990, fixed price. We start by asking how you run things today.

Request an audit →

Blog

Read more

Basics

QA, environments and Gitflow: getting code to production without surprises

Customers only ever see one environment – production. Three more sit backstage, and that's where all the work and all the mistakes should happen. The basics any team can introduce step by step.

Read →
Architecture

Message queues: why ticket checkout and chat shouldn't hang on a single call

SNS, SQS and similar message queues split a system into parts that don't fail together. And when something goes wrong, there's a trail: what happened, in what order, and when.

Read →
High traffic

Ticket drops, launches, flash sales: surviving the second everyone clicks at once

A concert ticket drop or a product launch is the hardest test a system can face. It isn't decided by one server but by a set of decisions made in advance – and at the centre there's almost always a distributed Redis.

Read →
Architecture

A fast site starts with understanding the browser

What to load first, what can wait, what's static and what really has to be computed per visitor. The decisions that decide speed – and whether a site survives peak traffic.

Read →
Databases

Database migrations: why they belong in your CI/CD pipeline

Code ships automatically, but the database is often changed by hand, “quickly, in production”. That's where most nasty surprises come from.

Read →
Basics

What DevOps actually does – one August, as an example

DevOps engineers are the reason a site stays up when everyone arrives at once. Here is what that looks like in practice.

Read →
Audit

Why an audit pays off before the season, not after

You can learn your system's limit in two ways: in advance, calmly – or mid-season, from your customers.

Read →
Security

What a web application firewall is – and who needs one

A web application firewall (WAF) is a guard at the gate: it lets guests in and stops those who come to do damage.

Read →
Reliability

A backup you've never restored isn't a backup

Most companies have backups. Far fewer have ever checked whether they can be restored.

Read →