aerospike - fast and furious caching @ burgasconf 2016

19
Aerospike – the fast and furious cache Burgas Conf @ 2016

Upload: tihomir-trifonov

Post on 14-Apr-2017

130 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Aerospike - fast and furious caching @ Burgasconf 2016

Aerospike –the fast and furious

cache Burgas Conf @ 2016

Page 2: Aerospike - fast and furious caching @ Burgasconf 2016

What is Aerospike

• Fast• Scalable• ACID compliant• Open Source• Schema-less• Querying• Aggregations/MapReduce using UDF

Burgas Conf @ 2016

Page 3: Aerospike - fast and furious caching @ Burgasconf 2016

What means fast?

• Flash/SSD optimized.• Simple AWS test to make 1 million TPS on one r3.8xlarge instance.

• 10 million keys, 100 byte string values, 50% read and 50% write

Burgas Conf @ 2016

Page 4: Aerospike - fast and furious caching @ Burgasconf 2016

Scalable

• Automatic cluster node discovery• Supports UDP/TCP.• Replication factor• Distributed reads/writes.• Self-managed – auto-heal, automatic data balancing,

recovery from partition split.

Burgas Conf @ 2016

Page 5: Aerospike - fast and furious caching @ Burgasconf 2016

ACID

• Atomicity• Data is read/written on 'master'.

• Consistency• A record is considered successfully written if all replicas acknowledge write.

• Isolation• Read-committed isolation level. Applying CaS (Check and Set or Test and

Set) concurrency scheme to allow parallel read-modify-write cycles.• Durability

• Data persisting on flash storage. Rack-aware replication. Cross data-center (XDR) replication for enterprise users.

Burgas Conf @ 2016

Page 6: Aerospike - fast and furious caching @ Burgasconf 2016

Open Source

• Aerospike Server - GNU Affero General Public License version 3 (AGPLv3) since June 2014.• Aerospike Client – Apache License.

Burgas Conf @ 2016

Page 7: Aerospike - fast and furious caching @ Burgasconf 2016

Schema-less

• Basically a Key-Value store, but...

Burgas Conf @ 2016

Page 8: Aerospike - fast and furious caching @ Burgasconf 2016

Schema-less: NamespacesBurgas Conf @

2016

Page 9: Aerospike - fast and furious caching @ Burgasconf 2016

Schema-less: SetsBurgas Conf @

2016

Page 10: Aerospike - fast and furious caching @ Burgasconf 2016

Schema-less: Record structure

• Key• Metadata

• TTL• Generation (auto-increment id)

• Bins a.k.a. Columns• Types: integer, string, bytes, double, list, map, GeoJSON, native-

language serialized (blobs), LDT (over 1MB of data).

Burgas Conf @ 2016

Page 11: Aerospike - fast and furious caching @ Burgasconf 2016

Querying - AQLBurgas Conf @

2016

Page 12: Aerospike - fast and furious caching @ Burgasconf 2016

Querying - AQLBurgas Conf @

2016

Page 13: Aerospike - fast and furious caching @ Burgasconf 2016

Querying - API

• Client libraries:• Java• C• C#• Python• Ruby• NodeJS• Go• Perl• PHP• Erlang

Burgas Conf @ 2016

Page 14: Aerospike - fast and furious caching @ Burgasconf 2016

Aggregations/MapReduce

• UDF (User-defined functions) written on Lua script.

Burgas Conf @ 2016

Page 15: Aerospike - fast and furious caching @ Burgasconf 2016

UDF (User-defined functions)Burgas Conf @

2016

Page 16: Aerospike - fast and furious caching @ Burgasconf 2016

Using UDF with AQLBurgas Conf @

2016

Page 17: Aerospike - fast and furious caching @ Burgasconf 2016

Application and use-cases

• Ad tech – fast sub-second ad selection on page load.• Gaming.• Fast/real-time data manipulation• Statistics

Burgas Conf @ 2016

Page 18: Aerospike - fast and furious caching @ Burgasconf 2016

Q & ABurgas Conf @

2016

Page 19: Aerospike - fast and furious caching @ Burgasconf 2016

Thank you!

Tihomir [email protected]

https://bg.linkedin.com/in/tisho

Burgas Conf @ 2016