Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cassandra at Hailo

Dave Gardner
February 04, 2014

Cassandra at Hailo

My talk at Cassandra London on 4th February 2014. Covers how Hailo use Cassandra.

Dave Gardner

February 04, 2014
Tweet

More Decks by Dave Gardner

Other Decks in Technology

Transcript

  1. Cassandra at Hailo
    David Gardner, Architect at Hailo
    CASSANDRALONDON2014

    View Slide

  2. CASSANDRALONDON2014
    5th year!

    View Slide

  3. CASSANDRALONDON2014
    What is Hailo?

    View Slide

  4. CASSANDRALONDON2014

    View Slide

  5. CASSANDRALONDON2014

    View Slide

  6. CASSANDRALONDON2014

    View Slide

  7. CASSANDRALONDON2014
    •  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
    Facts and figures

    View Slide

  8. CASSANDRALONDON2014
    Why Cassandra?

    View Slide

  9. CASSANDRALONDON2014
    “NoSQL DBs trade off traditional features to better
    support new and emerging use cases”
    Andy Gross, Riak
    http://www.slideshare.net/argv0/riak-use-cases-dissecting-the-solutions-to-hard-problems

    View Slide

  10. CASSANDRALONDON2014
    •  More widely used, tested and documented software
    •  Ad-hoc querying
    •  Talent pool with direct experience
    What are we trading off?

    View Slide

  11. CASSANDRALONDON2014
    •  High availability
    •  Scalability
    •  Operational simplicity
    What do we get back in return?

    View Slide

  12. CASSANDRALONDON2014
    A history lesson
    •  Version 1 launched in London in November 2010
    2 x PHP/MySQL web apps + 1 x Java/MySQL backend
    •  Version 1.5 launched in Dublin, then 13 others
    Transitioning to global Java and PHP services built on C*
    •  Version 2.0 launched 2013
    Global Java/Go services built on C* running on a common platform

    View Slide

  13. CASSANDRALONDON2014
    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

    View Slide

  14. CASSANDRALONDON2014

    View Slide

  15. CASSANDRALONDON2014
    Operational
    Cluster
    Stats
    Cluster
    ap-southeast-1 us-east-1 eu-west-1
    us-east-1 eu-west-1
    AWS VPCs with Open
    VPN links
    3 AZs per region
    m1.xlarge machines
    5.4TB storage; 600GB data

    View Slide

  16. AZ1
    eu-west-1
    AZ1
    AZ2 AZ2
    AZ3 AZ3
    AZ1
    us-east-1
    AZ1
    AZ2 AZ2
    AZ3 AZ3
    AZ1
    ap-southeast-1
    AZ1
    AZ2 AZ2
    AZ3 AZ3
    CASSANDRALONDON2014

    View Slide

  17. CASSANDRALONDON2014
    C* all the things
    Stats Service
    C* many of the things
    Enlightenment
    Time
    Happiness

    View Slide

  18. CASSANDRALONDON2014
    “How can you have wrong data model in C* when a
    CF is basically a hash in a hash”
    Anonymous Engineer at Hailo

    View Slide

  19. CASSANDRALONDON2014

    View Slide

  20. CASSANDRALONDON2014

    View Slide

  21. CASSANDRALONDON2014

    View Slide

  22. CASSANDRALONDON2014

    View Slide

  23. CASSANDRALONDON2014
    Lessons learned

    View Slide

  24. CASSANDRALONDON2014
    There will probably be an experience gap
    •  Have an advocate - get someone who will sell the vision internally
    •  Learn the theory - teach each team member the fundamentals
    •  Make an effort to get everyone on board

    View Slide

  25. CASSANDRALONDON2014
    Watch out for drift
    •  Cassandra can often be low maintenance – be pro-active
    •  Keep enough disk space for compactions
    •  Spot data model problems before they explode

    View Slide

  26. CASSANDRALONDON2014
    Conclusions

    View Slide

  27. CASSANDRALONDON2014
    We like Cassandra
    •  Solid design
    •  HA characteristics
    •  Easy multi-DC setup
    •  Simplicity of operation

    View Slide

  28. CASSANDRALONDON2014
    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

    View Slide

  29. CASSANDRALONDON2014
    The future
    •  We will continue to invest in Cassandra as we expand globally
    •  We will hire people with experience running Cassandra
    •  We will focus on expanding our reporting facilities
    •  We aspire to extend our network (1M consumer installs, wallet)
    beyond cabs
    •  We will continue to hire the best engineers in London, NYC and Asia

    View Slide

  30. CASSANDRALONDON2014
    Questions?

    View Slide