Română

A Technical Guide to Black Friday (Behind the Scenes). How We Prepare E-commerce Platforms for High Traffic

A Technical Guide to Black Friday (Behind the Scenes). How We Prepare E-commerce Platforms for High Traffic
05.11.2025

Based on our decade of experience in e-commerce, we present an essential technical guide: from database optimization and stress testing to proactive security and redundancy plans for the most critical time of the year: Black Friday. A single hour of downtime on Black Friday can mean tens of thousands of euros in lost sales and, most importantly, the erosion of customer trust.

Black Friday OPTI

For OPTI Software's e-commerce partners, Black Friday is an endurance test. Product catalogs can exceed hundreds of thousands of items, estimated traffic can surpass 100,000 daily sessions, and the number of HTTP requests can go over 10 million per day.

Preparing for Black Friday and the entire ensuing period of intense traffic is a technical process orchestrated in advance and structured on four pillars of action.

 

1. Strategic Planning and Landing Page Preparation

First, perfect alignment with the client's business strategy is key. Two months in advance, we make the first estimates for Black Friday, starting from the actual number of users, the experience of previous years, and the estimated marketing budget for promotion.

Three to four weeks before, we collaborate closely with the marketing team to prepare the digital battlefield: the landing pages (LPs) dedicated to the campaign. This year, some partners have dozens of landing pages (in the well-known black color).

Black Friday Landing Page Template

The design and content of the new pages (sliders, product carousels, teasing elements) are built on a staging environment. This allows the client to configure the campaigns in advance, and the pages can be optimized for performance.

A plan for the production launch at the designated hour is then made, through a precise, phased deployment process, involving both technical steps (e.g., activating promotional prices) and marketing actions (sending newsletters), all while avoiding downtime.

 

2. Proactive Optimization: Databases and Stress Testing

To ensure that thousands of orders can be processed without bottlenecks, we proactively focus on the most difficult element to scale: the database. One to two months before Black Friday, we conduct a performance audit on the SQL architecture (MySQL, PostgreSQL, etc.), optimizing it to simultaneously handle the influx of new orders (write operations) and the wave of visitors browsing the site (read operations).

A key technique is rewriting inefficient queries. For example, here are the concrete results of a recent MySQL audit:

Metric (Business Impact)BeforeAfterImprovement
Connection Errors (Site refusing users)684 0 ✅ Eliminated
Simultaneous Connections (Max limit 1000) 1001 (over limit)82 (under 10%)✅ Risk Eliminated
Serial Row Reads (Inefficient data scans)~7.1 billion / day~1.3 billion / day✅ 82% reduction
Slow Queries (Site loads slowly)~365 / day~149 / day✅ 59% reduction
Full Table Scans (Brute force searches)~3.76 million / day~3.1 million / day✅ 18% reduction

Another database technique is the denormalization of intensely accessed data or partitioning data into smaller chunks, possibly with archiving of old data (warm - rarely accessed or cold - unaccessed). Here is a monthly partitioning in PostgreSQL that accelerated some writes tenfold:

Black Friday Postgres Partitions
Table partitioning by month in PostgresQL

Also, about one month before Black Friday, during a low-traffic period (e.g., a weekend), we run a stress testing scenario. Using load testing tools like Grafana K6, we simulate a high volume of traffic. We then monitor server response times, CPU and RAM usage, as well as the performance of SQL servers under pressure.

 

3. Proactive Security and Attack Filtering

Black Friday is a magnet for malicious traffic, from DDoS (Distributed Denial of Service) attacks aimed at crashing the site, to bots trying to steal stock or test stolen credit cards. In the past, we have identified automated attack campaigns where up to 70% of total requests came from bot sources, consuming vital resources. A useful first clue is the country of origin of the requests, like in this case where China appeared to be the source of most of the traffic.

Black Friday China traffic
Traffic from China comming to a Romanian ecommerce portal

The proactive approach involves strict rules in Cloudflare WAF (Web Application Firewall) to block or hinder traffic from regions with likely malicious activity and to strengthen bot detection, as well as checking frontend and backend security (who has access to what resources)

 

4. D-Day: Redundant Measures for Stability at All Costs

For the day of the event, we activate an escalated plan of measures:

a) Application-level optimizations. Among them:

  • Postponing non-essential tasks: Non-essential automated tasks (cron jobs) are stopped or postponed to low-traffic intervals.
  • Reducing administrative access or separating the backend system for platform administrators from the frontend system for purchasing visitors.
  • Aggressive cache and content delivery management: Caching periods for pages and static elements (images, video, stylesheets, etc.) are increased to minimize requests to the origin and, implicitly, the database.

b) Backup plans for redundancy:

  • Horizontal scaling of the architecture: Quickly adding new resources (web servers or database replicas) to work in parallel.[6] Adding a load balancer that balances the load between servers.
  • Limiting intensive functionalities: The response frequency of functions such as live calculation of recommendations, active determination of applicable promotions, or character-by-character search (autosuggest) can be immediately reduced. These vary from one portal to another.

 

What Does Success Look Like?

On Black Friday, technical success is secondary to business results: the number of orders and brand protection. But the human feedback received after intense campaigns is the best validation.

As one partner said after a successful Black Friday campaign, emphasizing the value of collaboration:

"I'm glad it was a campaign where we effectively functioned as a team: sales - marketing + graphics - operational - technical - agency."

In conclusion, the goal of technology on Black Friday is to be robust and invisible, allowing clients to focus on what their store offers and shoppers to focus on finding the best deals!

 

Is your platform ready to handle success? Contact us for a performance audit and a discussion on how we can ensure the stability and success of your next Black Friday campaign!

 

Read More:

Steps Overview

Step 1: Strategic Planning and Landing Page Preparation

2-3 months prior, we align the technical strategy with the business and marketing goals. 3-4 weeks before, we prepare and optimize the campaign's dedicated landing pages in a staging environment.

Step 2: Proactive Database Optimization and Stress Testing

1-2 months prior, we conduct a database performance audit (MySQL, PostgreSQL), rewrite inefficient queries, and apply techniques like partitioning. We run a stress testing scenario to simulate Black Friday traffic.

Step 3: Proactive Security and Attack Filtering

We implement strict rules in the Cloudflare WAF to block bot traffic and DDoS attacks. We check frontend and backend security to ensure resource access is properly controlled.

Step 4: Redundancy Measures for D-Day Stability

On Black Friday, we activate the escalated plan: we stop non-essential tasks (cron jobs), enable aggressive caching, and are prepared for horizontal scaling (adding new servers) to maintain stability at all costs.

References

Quick Questions

How far in advance do you start preparing for Black Friday?

We begin strategic planning and traffic estimates two months in advance, and intensive technical optimizations, such as database audits, take place 1-2 months before the event.

What is a 'stress test' and why is it important?

A 'stress test' is a simulation of a very high volume of traffic on your website. It allows us to identify bottlenecks and measure server performance under pressure before the real traffic hits.

How do you prevent DDoS attacks and bot traffic?

We use an advanced Web Application Firewall (WAF), such as Cloudflare's, to automatically block malicious traffic from suspicious regions and implement strict bot detection rules, protecting server resources.

What does 'horizontal scaling' mean and how does it help on Black Friday?

Horizontal scaling means quickly adding new web servers or database replicas to work in parallel. A load balancer distributes traffic among them, ensuring the site remains fast and available even with an extremely high number of visitors.

What is the TLDR (conclusion)?

Preparing for Black Friday is a complex technical process that goes beyond simply adding resources. By applying DevOps principles—from SQL database audits and stress testing to horizontal scaling and WAF security—we build a robust infrastructure. The ultimate goal is invisible stability, preventing losses from downtime and protecting customer trust during the busiest e-commerce period of the year.

What technologies and methodologies are involved?

Technologies: MySQL, PostgreSQL, Grafana K6, Cloudflare WAF, Google Cloud, HubSpot
Methodologies: Strategic Planning, Database Performance Auditing, SQL Query Rewriting, Data Partitioning, Stress Testing, Malicious Traffic Filtering (Bot Detection), Horizontal Scaling, Aggressive Caching

Marian Călborean

Article written by

Marian Călborean

Manager, Software Architect, PhD. in Logic, Fulbright Visiting Scholar (CUNY GC, 2023)

See on LinkedIn →
Interesat?

Interested?

Schedule a meeting

Get a Free Audit

News and Guides

More News