---
title: "Scaling Shopify's BFCM Live Map: An Apache Flink Redesign"
description: "Shopify scaled its Black Friday/Cyber Monday live sales map by putting Apache Flink in front of Cricket, its home-grown Go stateful streaming service."
url: "https://swe.quest/articles/scaling-shopify-s-bfcm-live-map-an-apache-flink-redesign-bcbe156fa7990bd0"
canonical: "https://shopify.engineering/bfcm-live-map-2021-apache-flink-redesign"
source: "Shopify Engineering"
published: "2021-12-10"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["stream-processing","scalability","system-design","realtime"]
---

# Scaling Shopify's BFCM Live Map: An Apache Flink Redesign

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2021-12-10, 9 min read, Case study. Original: [https://shopify.engineering/bfcm-live-map-2021-apache-flink-redesign](https://shopify.engineering/bfcm-live-map-2021-apache-flink-redesign)

## Summary

Shopify scaled its Black Friday/Cyber Monday live sales map by putting Apache Flink in front of Cricket, its home-grown Go stateful streaming service. Flink filtered the checkout Kafka stream so Cricket processed only about one percent of the events, and Flink also computed new metrics such as product trends and unique shoppers. The Flink jobs used cross-region sharding and active-active deployment, handled load tests of 1M events/sec and ran with 100% uptime through BFCM, with Spark batch jobs as a fallback. Redis used for broadcasting to browsers still became a bottleneck and briefly clogged in production, so the planned redesign moves all metrics into Flink and snapshots them to a store that a web tier serves from an in-memory cache.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Stream processing](https://swe.quest/tags/stream-processing.md) (Data & databases)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)

## Prerequisites

- Kafka basics ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))
- stream processing concepts ([easy posts on Stream processing](https://swe.quest/tags/stream-processing.md?difficulty=easy))

## Keywords

Apache Flink, Kafka, Redis, Cricket, BFCM, Apache Spark

## Related posts

- [How we prepare Shopify for BFCM](https://swe.quest/articles/how-we-prepare-shopify-for-bfcm-4b4a641105e86a3e.md): Shopify Engineering · 2025-11-20 · Medium · 8 min read · Chaos engineering, Capacity planning, Scaling, SRE, E-commerce
  Shopify readies for Black Friday Cyber Monday with a year-long program that runs from March to October.
- [From Homegrown to Flink: Migrating a Stateful Ad Event Join at Scale](https://swe.quest/articles/from-homegrown-to-flink-migrating-a-stateful-ad-event-join-at-scale-34697efa4030f6e1.md): Zalando Engineering · 2026-07-23 · Hard · 12 min read · Stream processing, Storage engines, Performance engineering, Kubernetes, Ads
  Zalando's Ad Platform team replaced a 7-year-old homegrown Java service that joins ad auction (bid) events with user interaction events within a 15-minute window with an Apache Flink pipeline using RocksDB state and incremental checkpoints.
- [7 Tips For Optimizing Apache Flink Applications](https://swe.quest/articles/7-tips-for-optimizing-apache-flink-applications-be2dbc2fd7e74cd5.md): Shopify Engineering · 2022-03-08 · Medium · 14 min read · Stream processing, Performance engineering, Java & JVM, Debugging
  Lessons from running large stateful Apache Flink jobs (up to 13 TB of state) on GKE with the RocksDB state backend and checkpoints on GCS.
- [3 (More) Tips for Optimizing Apache Flink Applications](https://swe.quest/articles/3-more-tips-for-optimizing-apache-flink-applications-9c796b6721a565fb.md): Shopify Engineering · 2022-12-13 · Medium · 7 min read · Stream processing, Performance engineering, Queues & messaging
  Three practices for tuning large stateful Apache Flink jobs, drawn from Shopify's streaming platform.
- [Using Server Sent Events to Simplify Real-time Streaming at Scale](https://swe.quest/articles/using-server-sent-events-to-simplify-real-time-streaming-at-scale-27a5424d07541ac7.md): Shopify Engineering · 2022-11-30 · Medium · 9 min read · Real-time systems, Stream processing, Go, Scaling, Load balancing
  Shopify replaced its 2021 BFCM Live Map delivery path, in which WebSocket fed a presentation layer that clients polled through a mailbox system every 10+ seconds, with a Go Server Sent Events server.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
