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.
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).
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) | Before | After | Improvement |
| 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:
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.
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: