nosql at gumtree
DESCRIPTION
Presentation on the usage of NoSQL technologies at Gumtree.com Covers experiences of using Riak, Redis and MongoDBTRANSCRIPT
Andy Summers, Software Engineer
@NoSQL (or Not Only SQL)
We are the UK’s #1 classifieds website
and in the UK top 30 websites
with over 7 million visitors a month*
Which means almost 1 in 5 UK internet users visit us every month
* Average unique visitors according to ComScore data in 2013
A place which connects people to the things they need…
• 1.7 million live adverts
• 150 million adverts posted in all time
• 100,000 new adverts per day
• Approx 300,000 replies per day
Source: Gumtree data, November 2013
Gumtree Tech
Gumtree Tech
• 15 Back End devs• 6 Front End devs• 3 Mobile App devs• 5 Site Ops• 5 Product Managers• 6 QA• 3 Designers
Redis
RiakCassandra
mongoDBCouchDB
Neo4j
•Replies
•Sessions
•A few other things
Replies
v.1Mail
ServerMail
Server
REST API
Anony-mizer
CassandraMy
SQL
MobileApps
• OSGI
• Two sources of truth?!
MySQL MySQL
Scalability?
Cassandra
?
‘We need something better’
v.2Mail
ServerMail
Server
REST API
Anony-mizer
ElasticSearch
RIAK
MobileApps
‘Just a Key-Value Store’
• Real-time Querying?
• Reporting?
• My manager wants to know how many of x happened in y?
“But all of this
works fine in
MySQL…”
Use the Right Tool
for the Right Job
The German Story
Using iak for ReplyTS
15TB
18Nodes
2Data
centers
And then we Launched.
And everything was fine!
Well, at least 3 Months…
alwaysNew Technology
fails!
Backup... and if you can’t: have a backup plan
Have a
Dear Basho Devs,
So where are Gumtree in all this?
• Keeping a close eye on eBay Kleinanzeigen’s experiences
• Acknowledging that staying with the MySQL and Cassandra solution, is not suitable for Gumtree’s long term needs
Sessions
Richard
Gumtree servers
Interweb
Improving support for regular software releases
Oh… That’s not good.
• Off-peak release times only
• Sticky sessions have a lot to answer for
• Have to restart instance => Kill everyone on it
redis
Redis
• ‘Just another key-value store’
• Data typing
• TTL support
• Support for master-slave, monitoring, publish-subscribe
Richard
Gumtree servers
Interweb
Success!
Redis
Redis – all good?• Single master = single point of failure
• Sentinel – potential 66 seconds of downtime when master fails?
• Sharding is never easy
• Not tested dual data centre setup
The Other Stuff
mongoDB
• Popular Search Tracking
– High realtime write-traffic
– Regretting this a lot
• Some low traffic use cases
– Low traffic, low read
• Some batch event analysis
– Batched reads and writes
In Conclusion
• Data consistency vs. High availability
• NoSQL comes in many different guises, technologies suited for different use cases
• No technology is perfect
If you enjoyed this talk and like Gumtree
• eBay Tech Meetups across Europe– http://www.meetup.com/eBay-Europe-Technology
• Gumtree Careers via LinkedIn– http://linkd.in/1eu4rK5
Thank You!
…Questions or comments?