aerospike - fast and furious caching @ burgasconf 2016
TRANSCRIPT
Aerospike –the fast and furious
cache Burgas Conf @ 2016
What is Aerospike
• Fast• Scalable• ACID compliant• Open Source• Schema-less• Querying• Aggregations/MapReduce using UDF
Burgas Conf @ 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
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
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
Open Source
• Aerospike Server - GNU Affero General Public License version 3 (AGPLv3) since June 2014.• Aerospike Client – Apache License.
Burgas Conf @ 2016
Schema-less
• Basically a Key-Value store, but...
Burgas Conf @ 2016
Schema-less: NamespacesBurgas Conf @
2016
Schema-less: SetsBurgas Conf @
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
Querying - AQLBurgas Conf @
2016
Querying - AQLBurgas Conf @
2016
Querying - API
• Client libraries:• Java• C• C#• Python• Ruby• NodeJS• Go• Perl• PHP• Erlang
Burgas Conf @ 2016
Aggregations/MapReduce
• UDF (User-defined functions) written on Lua script.
Burgas Conf @ 2016
UDF (User-defined functions)Burgas Conf @
2016
Using UDF with AQLBurgas Conf @
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
Q & ABurgas Conf @
2016