• Like
  • Save
Acunu Analytics and Cassandra at Hailo All Your Base 2013
Upcoming SlideShare
Loading in...5
×
 

Acunu Analytics and Cassandra at Hailo All Your Base 2013

on

  • 1,266 views

Hailo, the taxi app, has served more than 5 million passengers in 15 cities and has taken fares of $100 million this year. I'm going to talk about how that rapid growth has been powered by a platform ...

Hailo, the taxi app, has served more than 5 million passengers in 15 cities and has taken fares of $100 million this year. I'm going to talk about how that rapid growth has been powered by a platform based on Cassandra and operational analytics and insights powered by Acunu Analytics. I'll cover some challenges and lessons learned from scaling fast!

Statistics

Views

Total Views
1,266
Views on SlideShare
1,233
Embed Views
33

Actions

Likes
1
Downloads
12
Comments
0

2 Embeds 33

https://twitter.com 19
http://lanyrd.com 14

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Acunu Analytics and Cassandra at Hailo All Your Base 2013 Acunu Analytics and Cassandra at Hailo All Your Base 2013 Presentation Transcript

    • Acunu Analytics and Cassandra at Hailo Tim Moreton, CTO at Acunu David Gardner, Architect at Hailo ALL YOUR BASE 2013
    • Dave ALL YOUR BASE 2013
    • What is Hailo? Hailo is The Taxi Magnet. Use Hailo to get a cab wherever you are, whenever you want. ALL YOUR BASE 2013
    • ALL YOUR BASE 2013
    • What is Hailo? • The world’s highest-rated taxi app – over 11,000 five-star reviews • Over 500,000 registered passengers • A Hailo hail is accepted around the world every 4 seconds • Hailo operates in 15 cities on 3 continents from Tokyo to Toronto in nearly 2 years of operation ALL YOUR BASE 2013
    • The history The story behind Cassandra and Acunu adoption at Hailo ALL YOUR BASE 2013
    • Hailo launched in London in November 2011 • Launched on AWS • Two PHP/MySQL web apps plus a Java backend • Mostly built by a team of 3 or 4 backend engineers • MySQL multi-master for single AZ resilience • Get/create/update entity • • Analytics Text search ALL YOUR BASE 2013
    • Why Cassandra? • A desire for greater resilience – “become a utility” Cassandra is designed for high availability • Plans for international expansion around a single consumer app Cassandra is good at global replication • Expected growth Cassandra scales linearly for both reads and writes • Prior experience I had experience with Cassandra and could recommend it ALL YOUR BASE 2013
    • The path to adoption • Largely unilateral decision by developers – a result of a startup culture • Replacement of key consumer app functionality, splitting up the PHP/MySQL web app into a mixture of global PHP/Java services backed by a Cassandra data store • Launched into production in September 2012 – originally just powering North American expansion, before gradually switching over Dublin and London ALL YOUR BASE 2013
    • One year on... • Further decompose functionality into Go/Java SOA • Migrating: Entity databases to Cassandra Analytics to Acunu Search into Elastic Search ALL YOUR BASE 2013
    • Cassandra ALL YOUR BASE 2013
    • We like Cassandra • Solid design • HA characteristics • Easy multi-DC setup • Simplicity of operation ALL YOUR BASE 2013
    • “Cassandra just works” Dom W, Senior Engineer ALL YOUR BASE 2013
    • CF = customers 126007613634425612: createdTimestamp: 1370465412 email: dave@cruft.co givenName: Dave familyName: Gardner locale: en_GB phone: +447911111111 ALL YOUR BASE 2013
    • Considerations for entity storage • Do not read the entire entity, update one property and then write back a mutation containing every column • Only mutate columns that have been set • This avoids read-before-write race conditions ALL YOUR BASE 2013
    • ALL YOUR BASE 2013
    • CF = stats_db 2013-06-01: 55374fa0-ce2b-11e2-8b8b-0800200c9a66: {“action”:”… a48bd800-ce2b-11e2-8b8b-0800200c9a66: {“action”:”… b0e15850-ce2b-11e2-8b8b-0800200c9a66: {“action”:”… bfac6c80-ce2b-11e2-8b8b-0800200c9a66: {“action”:”… ALL YOUR BASE 2013
    • CF = stats_db LON123456: 13b247f0-ce2c-11e2-8b8b-0800200c9a66: {“action”:”… 20f70a40-ce2c-11e2-8b8b-0800200c9a66: {“action”:”… 2b44d3b0-ce2c-11e2-8b8b-0800200c9a66: {“action”:”… 338a22f0-ce2c-11e2-8b8b-0800200c9a66: {“action”:”… ALL YOUR BASE 2013
    • ALL YOUR BASE 2013
    • Considerations for time series storage • Choose row key carefully, since this partitions the records • Think about how many records you want in a single row • Denormalise on write into many indexes/views ALL YOUR BASE 2013
    • ALL YOUR BASE 2013
    • 10 Average years experience per team member MySQL ALL YOUR BASE 2013 Cassandra
    • ALL YOUR BASE 2013
    • People who can attempt to query MySQL People who can attempt to query Cassandra #CASSANDRAEU 2013 ALL YOUR BASE CASSANDRASUMMITEU
    • ALL YOUR BASE 2013
    • Acunu Analytics ALL YOUR BASE 2013
    • Analytics • With Cassandra we lost the ability to carry out analytics eg: COUNT, SUM, AVG, GROUP BY • We use Acunu Analytics to give us this ability in real time, for preplanned query templates • It is backed by Cassandra and therefore highly available, resilient and globally distributed • Integration is straightforward ALL YOUR BASE 2013
    • Events NSQ ALL YOUR BASE 2013
    • Events NSQ ALL YOUR BASE 2013
    • Events NSQ Analytics turns events and SQL-like queries into C* operations ALL YOUR BASE 2013
    • Events NSQ Analytics turns events and SQL-like queries into C* operations Cassandra stores raw events and intermediate results ALL YOUR BASE 2013
    • Acunu Dashboards provides real-time visualization Events Alerts NSQ Analytics turns events and SQL-like queries into C* operations Cassandra stores raw events and intermediate results ALL YOUR BASE 2013
    • ALL YOUR BASE 2013
    • 1 Define aggregate cubes CREATE CUBE APPROX TOP(keyword) WHERE browser, time GROUP BY time count by day ALL YOUR BASE 2013 count by hour of day uniques by hashtag
    • 1 Define aggregate cubes CREATE CUBE APPROX TOP(keyword) WHERE browser, time GROUP BY time 2 New events update cubes count by day ALL YOUR BASE 2013 count by hour of day uniques by hashtag
    • 1 Define aggregate cubes CREATE CUBE APPROX TOP(keyword) WHERE browser, time GROUP BY time 2 New events update cubes count by day ALL YOUR BASE 2013 count by hour of day uniques by hashtag
    • 1 Define aggregate cubes CREATE CUBE APPROX TOP(keyword) WHERE browser, time GROUP BY time 2 New events update cubes raw events ALL YOUR BASE 2013 count by day count by hour of day uniques by hashtag
    • 1 Define aggregate cubes 3 Rich instant queries over cubes CREATE CUBE APPROX TOP(keyword) WHERE browser, time GROUP BY time SELECT TOP(keyword) FROM table WHERE browser = ‘chrome’ AND time BETWEEN.. GROUP BY d1, d2, ... JOIN ... HAVING.. ORDER BY .. 2 New events update cubes + raw events ALL YOUR BASE 2013 count by day count by hour of day uniques by hashtag
    • 1 Define aggregate cubes 3 Rich instant queries over cubes CREATE CUBE APPROX TOP(keyword) WHERE browser, time GROUP BY time SELECT TOP(keyword) FROM table WHERE browser = ‘chrome’ AND time BETWEEN.. GROUP BY d1, d2, ... JOIN ... HAVING.. ORDER BY .. 2 New events update cubes + raw events count by day 4 Drilldown to raw events ALL YOUR BASE 2013 count by hour of day uniques by hashtag
    • 1 Define aggregate cubes 3 Rich instant queries over cubes CREATE CUBE APPROX TOP(keyword) WHERE browser, time GROUP BY time SELECT TOP(keyword) FROM table WHERE browser = ‘chrome’ AND time BETWEEN.. GROUP BY d1, d2, ... JOIN ... HAVING.. ORDER BY .. 2 New events update cubes + raw events count by day count by hour of day 5 Backfill new cubes using historic data ALL YOUR BASE 2013 uniques by hashtag
    • AQL SELECT SUM(accepted), SUM(ignored), SUM(declined), SUM(withdrawn) FROM Allocations WHERE timestamp BETWEEN '1 week ago' AND 'now’ AND driver='LON123456789’ GROUP BY timestamp(day) ALL YOUR BASE 2013
    • ALL YOUR BASE 2013
    • Use Cases • Infrastructure and Application monitoring • Real-time A/B testing of app layout and incentives • Real time geo-view of supply/demand for drivers • Several more in the pipeline! ALL YOUR BASE 2013
    • Conclusions #CASSANDRAEU #AYBCONF CASSANDRASUMMITEU ALL YOUR BASE 2013
    • We like Cassandra and Acunu • Solid design • HA characteristics • Easy multi-DC setup • Simplicity of operation • With Acunu, rich queries again, easier denormalization ALL YOUR BASE 2013
    • Lessons for successful adoption • Have an advocate, sell the dream • Learn the fundamentals, get the best out of Cassandra • Invest in tools to make life easier • Keep management in the loop, explain the trade offs ALL YOUR BASE 2013
    • Questions? ALL YOUR BASE 2013