3 ms·
I have been in similar situation of handling huge spike in traffic due to festive sale season. After building huge amount of cheap datacenter capacity and optim
by vinay_ys 6y ago
I have been in similar situation of handling huge spike in traffic due to festive sale season.
After building huge amount of cheap datacenter capacity and optimizing our hardware/software stack, only reasonable thing we could do was to build lots of 'feature degradation flags' into our stack – things we could turn off to reduce stress on the system when under heavy traffic. For example, we could reduce the number of product cards shown per page, reduce the number of recommendation widgets per page etc. These could be turned on/off instantly by flipping a dynamic config flag (no deployments or restarts necessary).
Our organic search traffic used to generate huge amount of load on our backend services like pricing/promotions and logistics-promise services. We would isolate capacity of these backend services for serving such expensive upstream services and also put rate-limiting circuit breakers to avoid them from killing those critical backend services. Obviously, we had similar feature reduction/degradation mechanisms built into our data platforms. Capacity was reallocated for critical data pipelines and all experimental/training pipelines were stopped. Drill-downs or adhoc query interfaces were locked down. And, it goes without saying that during these few sale days, the proactive monitoring/alerting and oncall rigor was on high-alert to detect and react quickly in case systems didn't behave as expected.