You are on page 1of 25

High Performance NoSQL Database

From Development to
Deployment with
Docker & Aerospike
Powering New Opportunities at Scale

Existing Architectures Are Broken


Challenges
Real-time
Consumer Facing

Pricing /
Inventory/Billing

Real-time
Decisioning

Streaming
Data

Complex
Maintainability

Legacy RDBMS
HDFS BASED

Caching Layer

Durability

Operational Database

Consistency
Scalability
Cost ($)

Enterprise Environment

Data Lag
Legacy Database
(Mainframe)

RDBMS
Database

Transactional
Systems

3
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Flash Optimized High Performance


OTHER DATABASE

AEROSPIKE

OS FILE SYSTEM

HYBRID MEMORY SYSTEM

Direct device access


Large Block Writes
Indexes in DRAM
Highly Parallelized
Log-structured FS copy-on-write
Fast restart with shared memory

PAGE CACHE

BLOCK INTERFACE

SSD

HDD

OTHER
DATABASE

BLOCK INTERFACE

SSD

SSD

OPEN NVM

SSD

AEROSPIKE FLASH OPTIMIZED


IN-MEMORY DATABASE

4
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Use Cases

6
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

AdTech Real-Time Bidding


0 ms

100 ms

Challenge
Low read latency (milliseconds)
100K to 5M operations/second
Ensure 100% uptime

Ads is Displayed
Publishers

Provide global data replication

Performance achieved
1 to 6 billion cookies tracked
5.0M auctions per second
100ms ad rendering, 50ms real-time bidding,
1ms database access
1.5KB median object size

Selected Aerospike NoSQL over competition

10X fewer nodes


10X better TCO
20X better read latency
High throughput at low latency

Ad Networks & SSPs

Ad Exchanges

Data Management
Platforms

Demand Side
Platform

Brands

Agencies

Buyers

Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Real-time Fraud Prevention


Challenge
Overall SLA 750 ms
Loss of business due to latency
Every credit card transaction requires
hundreds of DB reads/writes

Credit Card Processing System

Need to Scale Reliably


10 100 TB
10B 100 B objects
200k I Million+ TPS

Rule 1-Passed
Rule 2-Passed
Rule 3-Failed

Fraud Detection & Protection App

Rules
Rule 1
Rule 2
Rule 3

Selected Aerospike In-Memory NoSQL


Built for Flash
Predictable low latency at high throughput
Immediate consistency, no data loss
Cross data center (XDR) support
20 server cluster
Dell 730xd w/ 4NVMe SSDs

Account Behavior
Static Data
Account Statistics

Historical Data

10
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Containers

Container Mission Reduce Complexity

Build

Run

Ship
Pla3orm

Clustering

RunC

Distribution

Plumbing
Notary

Open Standards
Container run-time spec

Image spec

13
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Open Container Initiative (OCI)

Coalition of industry leaders join forces to eliminate


fragmentation
Form a vendor-neutral, open source governance model under the
Linux Foundation
Establish common standards for container format and runtime
Docker donated its container format, runtime and associated
specifications
http://www.opencontainers.org/
Appoint maintainers for the libcontainer project

14
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Aerospike and Containers

Why Aerospike and Containers?


Shared nothing architecture
Automatic hashing of keys across the cluster
RIPEMD-160 collision free algorithm with Smart Partitions

Automatic healing & rebalancing of the cluster


Automated cluster discovery
Smart Client
Java, C/C++, C#, Python, Node.js

Automatic replication of data across nodes

16
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Aerospike enables
Scale (up and out) the persistence layer
Eliminate reconfiguration of the application and database tier
Utilize Containers on your dedicated infrastructure or cloud

17
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Demo: Development through to Production


Build & Run an App in Development
Python + Aerospike

Deploy to a Swarm cluster in Production


Scale Web services

Scale Aerospike Cluster in production

18
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Lets build an App!

web

python / flask

Aerospike

Development
19
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Scale in Production
HA Proxy

web

web1

web2

web3

web4

webN

Aerospike

asd1

Development

asd2

asdN

Production

20
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Demo 1 : Build an App

21
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Roll the App to Production behind HA Proxy


HA Proxy

web

web1

Aerospike

Aerospike

Development

Production

22
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Scale the web tier


HA Proxy

web

web1

Aerospike

Aerospike

Development

web2

web3

web4

webN

Production

23
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Docker Networking

24
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Demo 2 : Scale the Web Tier

25
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Scale the Aerospike cluster


HA Proxy

web

web1

web2

web3

web4

webN

mongodb

asd1

Development
26

asd2

asdN

Production

26
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Demo 3 : Scale the Cluster

27
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Storage: Inside or outside the container?


Inside
Host
Encapsulation of Concerns
daemon

Host
daemon
container

container

/dev/xvdb

e.g.
SSD

/data/db
/mnt/xx:/data/db

e.g.
EBS

Outside

Separation of concerns
Storage Features (e.g. snapshots)

28
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Summary

One solution from Dev -> Production


Define Container, their contents and how they work together once
Deploy the same images in Dev, Pre-Prod and Production across
Platforms
Running Docker & Aerospike in Production
Ops define the whitelisted images, security policies etc.
Dev use approved images to build upon
Eliminate the complexity (and cost) of deployment
29
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

Thanks and Q&A


Code
http://github.com/alvinr/docker-demo/tree/master/aerospike

Docker Images
http://hub.docker.com/r/aerospike/

Contact me!
alvin@aerospike.com
@jonnyeight

30
Proprietary & Confidential | 2015 Aerospike Inc. All rights reserved.

You might also like