redis - from lamp to nosql (cloudtw meetup-14)

Post on 26-Dec-2014

1.420 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

York Tsai,http://about.me/yorktsai

From LAMP to NoSQL

What is Redis?

REmote DIctionary Server

Redistribute

Memcache with rich data structure

Why Redis?

Our Database

Performance

http://www.ruturaj.net/redis-memcached-tokyo-tyrant-mysql-comparison

http://antirez.com/post/redis-memcached-benchmark.html

Rich Data Structure

Well-Documented

with Time-Complexity!!

Zero-Configuration

> Make

Examples

Cache a value

Cache a value, DEL/EXPIRE a set

redis > EXPIRE myhash 3600(integer) 1

redis > DEL myhash(integer) 1

List / Queue / Stack

Sets

Sorted Sets

Real-World Examples

Cache Statisticshttps://gist.github.com/1272511

Cache X Recent Records

https://gist.github.com/1272508

When not to Use Redis?

If your data cannot fit into memory.

(MMap is no longer supported after 2.6)

Frequently Asked Questions

Multi-core?

Open multiple instances

Persistence?

Append-only Files(Or Snapshot)

Replication?

Master-Slave

Transaction?

MULTI / EXEC + WATCH

Not in this talk

● Pub/Sub (publish / subscribe)● Redis Cluster (Incoming)

Thank You!

top related