aerospike at tapad

23
Magic Scaling Sprinkles Experience operating a high- volume, low-latency ad buying platform at Tapad @tobym @TapadEng

Upload: toby-matejovsky

Post on 08-Sep-2014

2.210 views

Category:

Technology


4 download

DESCRIPTION

Tap into the Secrets of Tapad's Success – How Tapad's ad-tech platform scales to hundreds of thousands of requests per second.

TRANSCRIPT

Page 1: Aerospike at Tapad

Magic Scaling SprinklesExperience operating a high-volume, low-latency ad buying platform at Tapad

@tobym@TapadEng

Page 2: Aerospike at Tapad

Who am I?Toby MatejovskyFirst engineer hired at Tapad 3+ years agoScala developer

@tobym

Page 3: Aerospike at Tapad

What are we talking about?

One of the key components that allows Tapad’s realtime ad-buying platform to hit 350,000 TPS.

Page 4: Aerospike at Tapad

Outline• What Tapad does• Why Aerospike is a good fit• Operational experience• What’s next

Page 5: Aerospike at Tapad

What Tapad Does(Real-time bidding)

The Tapad Difference.A Unified View.

Page 6: Aerospike at Tapad

Ad exchangeWant to show an ad to device 123?

Tapad

Sure, show this ad for $2 CPM

No thanks

Great, you won. Ad was displayed!

How about to device XYZ?

95% response time: ~30 ms

Page 7: Aerospike at Tapad
Page 8: Aerospike at Tapad

Why Aerospike?FastSafeScale outExpiration/eviction

Page 9: Aerospike at Tapad

Super fast key-value store350,000 reads per secondon 7 nodes

99% of reads are under 1 millisecond

Page 10: Aerospike at Tapad
Page 11: Aerospike at Tapad

SafeReplication factorXDR (cross datacenter replication)SSD-backed

Page 12: Aerospike at Tapad

Scale outLinear scalability, just add a node*

*will revisit this during the next section

Page 13: Aerospike at Tapad

Expiration and evictionOld data expires automaticallyOldest data is evicted if the database is running out of space

This is desired behavior in ad-tech world

Page 14: Aerospike at Tapad

Operational experience with Aerospike at TapadConfigurationMigrationsEvictionUsage

Page 15: Aerospike at Tapad
Page 16: Aerospike at Tapad

Tapad’s Aerospike Configuration100% keys in memory

100% data in SSD storage

Replication factor 2

512-byte block size

Need lots of free space in memory and storage for defrag (high-water mark)

Page 17: Aerospike at Tapad
Page 18: Aerospike at Tapad

Migrations and partitionsNew node requires data migration, means degraded performanceNetwork partition may trigger some data migration

Page 19: Aerospike at Tapad

EvictionAwesome feature, not intuitive if objects’ TTLs are not nicely distributed

Page 20: Aerospike at Tapad
Page 21: Aerospike at Tapad

UsageBlocking and non-blocking clients availableLZ4-compressed protobufHot key error

Page 22: Aerospike at Tapad

What’s next?Smaller minimum block sizeReplace Redis (UDFs)Multiple keys to reference the same record

Page 23: Aerospike at Tapad

Thank You@tobym@TapadEng

Toby Matejovsky, Director of [email protected]@tobym