Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Evolution of a Real-Time Web Analytics Platform
Search
Geoff Wagstaff
October 18, 2013
Technology
410
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Evolution of a Real-Time Web Analytics Platform
Talk about data stores in use at GoSquared at the AllYourBase conference.
Geoff Wagstaff
October 18, 2013
More Decks by Geoff Wagstaff
See All by Geoff Wagstaff
GoSquared Presentation at AWS for Startups
thedeveloper
1
720
Other Decks in Technology
See All in Technology
AWS FinOps Agent 結局何が得意なの?
siromi
0
230
全社共通データ基盤をつくる。ソニーのDatabricks活用とデータガバナンス設計の裏側
sony
0
290
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
1
640
React Nativeでの OTA Updateって、 どう説明する?
ichiki1023
0
130
3人で1000GPU超を統合運用する?マルチクラウド&オンプレを跨ぐ、構築と運用のリアル!
kazukun0716
2
800
【データ横丁主催】AI Agentがコンテキストを使って仕事をした後、何が残るのか― 組織の経験を次の判断に引き継ぐ「Agent Memory」
shisyu_gaku
2
310
行動するAIのためのオントロジー | DevRev — Encraft #26.pdf
dvrv_tknrszk
2
660
TiDBファミリーにDWHが新登場!! TiDB最新情報 / TiDB update 202609
yoshiakiyamasaki
0
180
2026-10-01_MagicPod_QAハーネスエンジニアリングとQA組織の未来像
ynisqa1988
1
280
AIに書かせて、プラットフォームで縛る ― EKSプラットフォームで実践した責任境界と権限設計
elmodev09
1
1.1k
プラットフォームを「作る」、 チームに「入り込む」
sansantech
PRO
0
430
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
290
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Six Lessons from altMBA
skipperchong
29
4.5k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
240
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
730
Tell your own story through comics
letsgokoyo
1
1.1k
Crafting Experiences
bethany
1
360
KATA
mclloyd
PRO
35
16k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
690
How to train your dragon (web standard)
notwaldorf
97
6.8k
Optimising Largest Contentful Paint
csswizardry
37
4k
Transcript
The Evolution of a Real-Time Analytics Platform Geoff Wagstaff @TheDeveloper
The Now dashboard
The Trends dashboard
Building Real-Time Analytics Behind the “Now” dashboard
Back in 2009 1 server LAMP stack Conventional hosting
LiveStats v1
None
Meltdown!
Problem? First taste of scale WRITES
Reads are easy to scale Primary Writes Replica 1 Replica
2 Replica 3 Reads Reads Reads
Writes? Not so much. Primary MANY WRITES! Replica 1 Replica
2 Replica 3 Reads Reads Reads :(
Scale Horizontally
Node Node Node Requests Requests Requests NginX -> PHP-FPM <-->
Memcache
Problems
Stupidly high data transfer: several TB per day DB ->
app -> DB round trips High latency on DB ops Race conditions
Redis to the rescue! “Advanced in-memory key-value store”
Rich Data types
Rich Data types Keys Hashes Lists Sets Sorted Sets GET
SET HGET HSET HMSET LPUSH LPOP BLPOP SADD SREM SRANGE ZADD ZREM ZRANGE ZINTERSTORE
Distributed locks Service Service Service Fast counters Fan-out Pub/Sub broadcast
Message queues redis-1 redis-2 Solved concurrency problems
ACID
A C I D tomic onsistent solated urable MySQL MongoDB
Other ACID DBs:
Fast
Fast Redis 2.6.16 on 2.4GHz i7 MBP
Single-process, one per core Run on m1.medium - 1 core,
3.5GB memory Redis cluster is coming! Now on Elasticache Redis deployment
Behind the “Trends” dashboard Building Historical Analytics
Trends v1
Sharded MySQL from outset Aging Unreliable Trends v1
The Trends dashboard
MongoDB vs Cassandra
MongoDB Document store: no schema, flexible Compelling replication & sharding
features Fast in-place field updates similar to Redis
Attempt #1: Store & aggregate Document for each list item,
timestamp and site Aggregation framework: match, group, sort Collection per list type Flexible Made app simpler Huge number of documents Slow aggregate queries: ~1s+ ✔ ✔ X X
Attempt #2 Document per list, timestamp and site Collection per
list type Faster lookups (no aggregation) Fewer documents Smaller _id Document size limit Unordered High data transfer ✔ ✔ ✔ X X X
MongoStat
Downsides High random I/O Document size & relocation Fragmentation Database
lock
K.O. MongoDB
Cassandra Distributed hash ring: masterless Linear scalability Built for scale
+ write throughput
CQL
CQL SELECT sql AS cql FROM mysql WHERE query_language =
“good” Not as scary as Column Families + Thrift SQL Schemas + Querying
CQL CREATE TABLE d_aggregate_day ( sid int, ts int, s
text, v counter PRIMARY KEY (sid, ts, s)) partition key cluster key Distributed counters!
B ASE
B A S E asically vailable oft-state ventually consistent
Eventual consistency isn’t a problem More efficient with the disk
Low maintenance Cheap
Redis + Cassandra = win Redis as a speed layer
+ aggregator for lists Cassandra as timeseries counter storage Collector Redis Cassandra Periodic flushes to Cassandra
Exploit DBs strengths Build an indestructible service Use the best
tools for the job
Thanks! Geoff Wagstaff @TheDeveloper engineering.gosquared.com