Redis Author Anil Sharma Data Structure server http

  • Slides: 18
Download presentation
Redis: ~ Author Anil Sharma Data Structure server http: //tyagibhai. com

Redis: ~ Author Anil Sharma Data Structure server http: //tyagibhai. com

What is Redis? It stands for Remote Directory Server Redis is an open source

What is Redis? It stands for Remote Directory Server Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

Who is using redis? source: http: //techstacks. io/tech/redis

Who is using redis? source: http: //techstacks. io/tech/redis

Why Redis

Why Redis

Ridiculously fast/Low latency

Ridiculously fast/Low latency

I am tired

I am tired

Whooo. . .

Whooo. . .

Ridiculously fast/Low latency Data structure storage Open source and easy to use Replication and

Ridiculously fast/Low latency Data structure storage Open source and easy to use Replication and persistence Support for your favorite development language Auto expire Transactions and Event queue/Pub. Sub Lua scripting

When redis?

When redis?

Page Caching / Session caching / Cookie Storage / Search Engine Counter / Analytics

Page Caching / Session caching / Cookie Storage / Search Engine Counter / Analytics / Fraud Detection Data that expires / Leaderboards Ad targeting Messaging High I/O workload Geo searches Configuration management

Data Types: Strings — a sequence of binary safe bytes up to 512 MB

Data Types: Strings — a sequence of binary safe bytes up to 512 MB Hashes — a collection of key value pairs Lists — an in-insertion-order collection of strings Sets — a collection of unique strings with no ordering Sorted sets — a collection of unique strings ordered by user defined scoring Bitmaps Hyperloglogs Geospatial indexes with radius queries

Namespacing: We can use “. ” or “-” to make it easy Ex. Video.

Namespacing: We can use “. ” or “-” to make it easy Ex. Video. category. id. downloads Video. category. id. likes Video. category. id. comments Image. category. id. downloads User. id. userinfo User. id. last. Login

What is redis not good for 1. 2. 3. 4. 5. 6. Neither SQL

What is redis not good for 1. 2. 3. 4. 5. 6. Neither SQL nor No. SQL Need ACID Transaction Every byte is precious Single threading Memory problem Security

How to?

How to?

http: //try. redis. io/

http: //try. redis. io/

Thankyou Ask question : goo. gl/slides/qqgryu Tweet : @real. Anil. Sharma with #Redis

Thankyou Ask question : goo. gl/slides/qqgryu Tweet : @real. Anil. Sharma with #Redis