Yalda night sales and Nowruz traffic: getting your site ready for the hour everyone shows up
Campaign traffic isn't a normal day with more visitors. Everyone arrives in the same minute, on the same page, with the same goal.
Co-founder, Parslinks · Team, marketing & infrastructure
December 21st, 8:55pm. Marketing has scheduled the Yalda night sale SMS to two hundred thousand people. (Yalda, the longest night of the year, is one of the biggest shopping evenings in Iran.) At 9:00 the messages go out, and in under three minutes the "Yalda deals" page gets more visits than the whole previous day. At 9:04 the first 502 appears: the database has hit its connection limit. By 9:20, when it's fixed, much of that traffic is gone and not coming back.
The Yalda sale, pre-Nowruz discounts, Black Friday (now a fixture in Iran too), or even one post from an influencer: they all share a pattern. Traffic doesn't climb gradually; it arrives all at once. And arriving all at once breaks things that were never a problem on a normal day.
What breaks first?
From what we've seen in Iranian shops' campaigns, the order is almost always the same:
- Database connections. Each app instance holds a pool of connections. Scale out for the campaign and the total exceeds the database's limit, and requests queue at the door.
- Queries without indexes. The "discounted items only" filter that ran instantly on ten thousand rows bends the database under a hundred concurrent requests.
- Pages that could have been cached but weren't. The campaign page is identical for everyone, yet it's rebuilt on every visit.
- External services. Order-confirmation SMS, warehouse stock checks, the payment gateway itself; each has its own limits.
Servers and CPU are usually the last to break, which is why adding instances alone doesn't help, and sometimes makes the first problem worse.
Load testing: measure, don't guess
Two weeks before the campaign, load-test a preview (against a database with production-sized data). Target: three times the highest traffic you saw last campaign. k6 is simple and free:
The key part of this script is the second stage: going from 50 to 600 users in thirty seconds. That's what traffic really looks like after an SMS blast. A test that ramps up gently never sees that moment.
Test the checkout path too, but not against the real gateway; use the gateway's test mode or a simulated response.
The plan, from two weeks out to the morning after
Caching: the cheapest capacity
The campaign page, the discounted-products list and product pages are the same for every user, so they don't need a database read per visit. In Next.js, build them with periodic regeneration (say every 60 seconds). Only read stock and the final price from the database at add-to-cart time.
A 60-second cache means the page is built once a minute, whether ten people visit or ten thousand.
Queues: take non-urgent work off the user's path
When a user hits pay, only two things must happen: the order is saved and they go to the gateway. Confirmation SMS, invoice email, stock updates and sales reports can all wait in a queue and run a few seconds later.
The day before: deploy freeze
The simple rule with the biggest impact: from 24 hours before the campaign, no new code ships unless it fixes something critical. And if something does ship, rolling back must take seconds, not a rebuild.
| Symptom on campaign night | Likely cause | Immediate action |
|---|---|---|
| Sudden 502s and 504s | Database connection limit | Shrink each instance's pool or enable a pooler |
| Campaign page slow, rest fast | The page isn't cached | Turn on periodic regeneration for that page |
| Payments return but orders aren't saved | Timeout on the gateway callback | Check callback logs and raise that route's timeout |
| Confirmation SMS arriving late | SMS provider rate limit | Send through a queue at a controlled rate |
On Parslinks
Several parts of this plan are simpler on a platform: you run load tests against the branch preview, not production; you raise the instance count for campaign night and lower it the next morning; and if a deploy that day causes trouble, you roll back to the previous version without rebuilding.
One habit for next time
After every campaign, write down three numbers: peak requests per minute, p95 latency at the peak, and the first thing that errored. Those three numbers are the starting point for the next campaign's plan. A team with these notes walks into Nowruz with data, not guesses.
Frequently asked questions
Join the discussion
No comments yet. Be the first to share your thoughts.
Related posts
- Deploy
Zero-downtime deployments in practice: rolling, blue/green, and promoting the same artifact
A restart is the simplest way to deploy, and the seconds the service is down are the seconds orders fail. This post lists where downtime really comes from, compares three common release strategies, and shows how to change your database without an outage.
- Deploy
Deploying Next.js to production: what SSG, ISR and SSR each need from your infrastructure
Each page's rendering mode decides what your server has to do. This post covers what SSG, ISR, SSR and PPR need from your infrastructure, how standalone output works, and what breaks once the app runs on more than one instance.
- Platform
PaaS or a VPS? The real DevOps hours behind a small team's server
The VPS price is on the invoice. The hours spent on patches, SSL renewals, deploy scripts and midnight restarts are not. This post counts those hours, compares them with a platform, and is honest about when a VPS is still the better call.
