This year, we built a Black Friday-Cyber Monday (BFCM) dashboard to celebrate the success of our customers through the busy retail weekend. The dashboard gave a real-time look inside Vercel's infrastructure, showing live metrics for deployments, requests, blocked traffic, and more.
Building a data-heavy, real-time dashboard with a good user experience comes with challenges. Let's walk through how we overcame them.
Link to heading Dashboard architecture
The BFCM dashboard is a Next.js application built using a modified polling architecture. The core of the site works by having the client poll the server for data every 10 seconds.
Upon receiving the request, the server queries our internal database and returns the aggregate metrics to the client. Behind the scenes, our APIs and services stream data about our requests, deployments, and the Vercel Firewall into the database.
Link to heading Backend optimizations
The metrics we wanted to highlight involved scanning terabytes of data.…