internalsGet Pro

Module 13 · Lesson 6 of 10Pro

Serving analytics in products: dashboards and APIs

Level
Intermediate
Topic
OLAP and real-time analytics
Reading time
17 min

When you finish this page you can

  1. Explain why analytics shown to thousands of outside users needs an API in front of the database, not a database login or a SQL box.
  2. Design a seller-facing endpoint where the seller comes from the login token and the query is a fixed template with typed parameters.
  3. Work out how a server-side cache, per-seller rate limits and query timeouts cap the load on ClickHouse.
  4. Set limits on both sides of the API, so a query the API gave up on also stops inside ClickHouse.

Builds on 2 lessons

Start with lesson 217 min
  1. Real-time OLAP: ClickHouse, Druid and Pinot17 min
  2. Pre-aggregation and rollups16 min

Seller 4418’s sales on seller 4417’s screen

At 11:20 IST on Thursday 6 January 2028, a tester opens the new “Your sales today” panel in Kartly’s seller app. It shows 312 orders for seller 4417. She edits the request in her browser’s developer tools, changes seller_id=4417 to 4418, and sends it again. The panel now shows another seller’s sales, order by order.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan