Na 8tracks a gente acredita na ferramenta certa pra resolver os problemas que a gente encontra pela frente! Passamos por vários desafios, mas encontramos uma ferramenta excelente pra nos ajudar a servir mais de 100 mil request por minuto e tornar nossos problemas de persistência bem mais simples. Redis salvou a nossa pele mais de uma vez!
23. things to keep in mind
• all in memory (but not restricted to)
• no joins or iterating over data (but not restricted to)
• you should be able to rebuild data
24. why?
• sometimes basic data structures is all you need
• some problems are hard to fit in a relational way
25. redis @ 8tracks = <3
sidekiq
feature toggles
caching
player (moved to couchdb, then to mysql)
autocomplete (moved to SOLR, then to ElasticSearch)
tag browsing!
news feed
listening sessions
rate limiter
31. 1 SELECT name !
! ! FROM tags !
! ! WHERE name !
! ! LIKE 'ind%' LIMIT 10;!
!
2 SELECT name !
! ! FROM mixes !
! ! WHERE name !
! ! LIKE 'ind%' LIMIT 10;!
!
3 SELECT login !
! ! FROM users !
! ! WHERE login !
! ! LIKE 'ind%' LIMIT 10;!
!
4 SELECT name !
! FROM artists !
! WHERE name !
! LIKE 'ind%' LIMIT 10;!
32. you could do
1 (SELECT name FROM tags WHERE
name LIKE 'ind%' LIMIT 10)!
2 UNION ALL!
3 (SELECT name FROM mixes WHERE
name LIKE 'ind%' LIMIT 10);!
33. the problems
• cross-type search
• I don’t want 10 of each, I want the 10 most relevant
ones
• can’t select different column counts
34. not a fair comparison
people don’t use sql databases for search.
they use SOLR (or elasticsearch)