couchbase live europe 2015: viber: nosql performance at scale
TRANSCRIPT
WelcomeAmir ish-Shalom, Chief Architect
What we do
• Messages & Stickers
• Audio messages & video
• Group conversations
• Full multiple device support
• HD video & phone calls
• Viber out
We are adding new functions
TO become even more SOCIAL
‘Imagine if you could listen in
on somebody else’s conversation?’
Public Chats
• Chat owners
• Participants
• Followers
Public Chats -
Features• ‘Likes’
• Live updates to all online followers
• Invite a friend to follow
• Search & explore
Games• Developed by 3rd parties
• Viber characters & style
• “Viber Connect”
• Friends list
• Messaging via Viber:
• Invites
• Gifts & “bragging”
• User to user communication
Viber Usage
Everybody’s vibing
• 530+ Million users worldwide
• 236+ Million Monthly Active Users
• 1+ Million new users every day
• Billions of messages sent every day
• iOS, Android, desktop (and more)
Strong growth in
2014NOW OVER 530 million Viber unique ids
1
9
4
0
7
4
1
2
5
1
9
4
2
8
0
3
7
5
46
0
Jun/11 Dec/11 Jun/12 Dec/12 Jun/13 Dec/13 Jun/14 Nov/14
*Unique IDs: Unique phone numbers excluding deactivations (Millions of unique users)
2015-01
2014-12
2014-11
2014-10
2014-09
2014-08
2014-07
2014-06
2014-05
2014-04
2014-03
2014-02
2014-01
2013-12
2013-11
2013-10
2013-09
2013-08
2013-07
2013-06
2013-05
2013-04
2013-03
2013-02
2013-01
2012-12
2012-11
2012-10
2012-09
2012-08
2012-07
2012-06
2012-05
2012-04
2012-03
2012-02
2012-01
2011-12
2011-11
2011-10
2011-09
2011-08
2011-07
2011-06
2011-05
2011-04
2011-03
2011-02
2011-01
Strong Growth in
2014In 2014 vs. 2013 there was:
• 2.5x growth in talking minutes
• 3x growth in messages
• 10x growth in group messages
a truly global platformNorth
America7.2%
Central &south
America
9.0%
Westerneurope19.9% eastern
europe11.7%
Middleeast
14.2%
africa8.0%
Asia & Asia
pacfic29.9%
Source : Viber Cumulative
activated users, percentage
share by region. Oct 31, 2014
Viber global PenetrationViber is used by 12% of the world’s mobile device
owners
WhatsApp LINE KakaoTalk WeChat
39
%
12
%10
%6
%4
%
Percentage of
world’s mobile users
(excl. China) who
uses each app
Source: GlobalWebIndex Q2
2014, published Sep25 2014
Top 5 global
marketsRussia
28m
India
32m
uk
14m
Brazil
18m
america
30m
*Unique IDs: Unique phone
numbers excluding deactivations
Database Architecture
Viber DB Architecture – 1st
Generation
In-house
in-memory DBApplication ServersViber
Clients
Viber DB Architecture – 2nd
Generation
Redis Cache MongoDB Cluster
Redis Clusters
Application ServersViber
Clients
Redis Sharder
Redis Sharder
2nd Generation DB Architecture
Problems• MongoDB performance
• MongoDB does not scale well with many application servers
• Redis – In-memory database with no sharding
• Redis Sharder – Not manageable and robust enough
3rd Generation DB Architecture
Requirements• High performance
• Large data sets
• Scalable
• Robust
• Backed-up
• Always on
• Easy to monitor
• Prefer single DB solution
Solution:
Viber DB Architecture – 3rd
Generation
Application ServersViber
Clients
Couchbase
Backup
ClusterCouchbase
Clusters
XDCR
Migrating from 2nd to 3rd
Generation DB’s• Migrate a live system
• Zero downtime
• No data loss
• Consistent data
MongoDB Cluster
Redis Clusters
Couchbase
Clusters
CouchBase Usage
CouchBase Usage
• Over 2 Million operations per second
• ~200 Couchbase servers in 8 different clusters
• Almost 1000 application servers
• Cluster sizes between 3 to 51 nodes
• Clusters have between 0-2 replicas (most have 1 replica)
CouchBase Versions
• Most clusters using CB v2.51
• 2 clusters have been migrated to CB v3.02
• Currently testing CB v3.02 and planning migration
How a one line mistake can
create 500,000 ops
Launch of a new product
21 node cluster with Over
800,000 OPS
Questions?
Thank You