Top Banner
27

Tadas Pivorius. Married to Cassandra

May 10, 2015

Download

Software

#BigDataBY
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Tadas Pivorius. Married to Cassandra
Page 2: Tadas Pivorius. Married to Cassandra

ABOUT

Simple developer

In DSP team

Real time auction engine for Ads

Page 3: Tadas Pivorius. Married to Cassandra

BUSINESS CASE

A lot of users

A lot of data

Real time decision making

Based on data we have

Page 4: Tadas Pivorius. Married to Cassandra

CONTENT

We are living with Cassandra already more than 26000 hours and counting

I picked up random moments from our interesting marriage

Sometimes sleepless nights

A lot of intense days

Some experience gained hopefully

Come by and discuss things

Page 5: Tadas Pivorius. Married to Cassandra

I was born

Page 6: Tadas Pivorius. Married to Cassandra

Went to school

Page 7: Tadas Pivorius. Married to Cassandra

Finished university

Page 8: Tadas Pivorius. Married to Cassandra

Something special has happened

Page 9: Tadas Pivorius. Married to Cassandra

LET’S STORE COOKIE PROFILES FIRST

Search for fast, scalable storage

Capable of storing big amount of data

And handle write intense workload

Please, not SQL Server again?

Page 10: Tadas Pivorius. Married to Cassandra

OH, NO-SQL YOU SAY

Cassandra!

Let’s do some benchmarks and compare!… with what?

Ok… let’s bring it home

Page 11: Tadas Pivorius. Married to Cassandra

HAPPY MOMENT

Adform was mainly Microsoft based company

First open source project in company

First “Linux first” piece of software

First COOL tech

Started to adopt other open source / not Microsoft solutions afterwards

Page 12: Tadas Pivorius. Married to Cassandra

MICROSOFT BASED…

No Linux experience etc.

Let’s run on windows as it’s written in JAVA

All services was written in .NET

…and no libraries for .NET at all

Virtualization…

Page 13: Tadas Pivorius. Married to Cassandra

HAPPY MOMENT

It’s very fun to invent things

In house .NET client with failover, load balancing, dynamic node discovery

Page 14: Tadas Pivorius. Married to Cassandra

FINALLY UP AND RUNNING

3 (+-) years ago started in PROD with version 0.7 beta 2

Everything was running smooth with few gigs of data

Hardware had a lot of spare capacity

Were proud NO SQL experts

Page 15: Tadas Pivorius. Married to Cassandra

DSP KICKS IN

Decision to start DSP project

Data in Cassandra for decision making

A lot of frontend servers

More reads and

… 20 ms. per requests SLA

Page 16: Tadas Pivorius. Married to Cassandra

20 MS

20 MS – GAME CHANGER

OK when you can allow 100 MS for part of the requests

Page 17: Tadas Pivorius. Married to Cassandra

SAD MOMENT

Move from Windows to LinuxMove from virtual to bare metal“Smart” in house Cassandra clientData access tuning for ex. Dynamic snitchOptimizing memory usageCode base optimized on data accessData in RAMGC tuningCompaction tuningConsultancy

Page 18: Tadas Pivorius. Married to Cassandra

SAD MOMENT

Fat nodes

Stability

Page 19: Tadas Pivorius. Married to Cassandra

RESULTED IN

A lot of DEV time spent

On tracking changes in new Cassandra releases

Tweaking configuration

Monitoring compactions, read stages etc.

Thinking about further optimizations

…but…

Experience was extracted

Page 20: Tadas Pivorius. Married to Cassandra

AND ON TOP

Scale 4x times!!!

Maybe it’s time to search for alternatives

Fast read access

CONSISTENT read access

Fat nodes

Low time on maintenance

.NET “compatible”

Page 21: Tadas Pivorius. Married to Cassandra

AEROSPIKE

Aerospike?

Not open source at that time

Quite amount of money

Promises looks too good

Everyone skeptical

But let’s give a shot

Page 22: Tadas Pivorius. Married to Cassandra

SHOT

POC cluster

2 nodes, SSD based, consumer grade discs

Shadow workload

No tweaking

“FAT” nodes

Page 23: Tadas Pivorius. Married to Cassandra

SHOT

Forgot all skepticism in one week

POC became PROD

Disc load >90%

5 month no problems

99% < 10ms consistent performance

Simpler, easier to maintain code base

Focus on business

Page 24: Tadas Pivorius. Married to Cassandra

JUST IN CASE

So we are running on proprietary piece of software

But.. data model, access patterns are compatible with most nosql’s

Just in case

It’s already open source

Page 25: Tadas Pivorius. Married to Cassandra

CASSANDRA

Cassandra still in toolbox

To maintain knowledge base

And it’s great

For less time restricted workloads

Write workloads

Other cases

Page 26: Tadas Pivorius. Married to Cassandra

THE END

When you feel that someone becomes too big part of your life

In not pleasant way

Search for alternatives

Love ends in 3 years

Data model is important

Read documentation (limitations etc.)

I don’t know – maybe there is more

Page 27: Tadas Pivorius. Married to Cassandra

NUMBERS

2 storage servers

1 TB of data

120 000 reads

8 000 writes

42 client servers