Más contenido relacionado
La actualidad más candente (20)
Similar a Redis - N✮SQL Berlin (20)
Redis - N✮SQL Berlin
- 1. Redis - Fast and Furious
N✮SQL Berlin
Mathias Meyer, 22.10.2009
Peritor GmbH
- 2. Self
I work at
Peritor in Berlin
I tweet
@roidrage
I code at
http://github.com/mattmatt
I blog at
http://paperplanes.de
2
- 3. Peritor
Working on
http://scalarium.com
3
- 4. Redis - Key-Value Store
Simple, yet awesome
Fast, yet nonvolatile
code.google.com/p/redis
4
- 16. Redis Protocol - Special Ops
Push and pop elements
(atomic)
Fetch arbitrary set and
array elements
Sorting
16
- 24. Redis Protocol - Lists
lrange pizza 0 1 Request
*2
$4
fury Response
$8
ortolana
21
- 28. Redis Protocol - The Rest
Random list/set access
Intersections, Unions
Monitoring
Controlling the Server
Multi-Set Commands
25
- 32. Redis Database
Redis Server
Dump
Database
fork()
Redis Server rename()
exit()
29
- 36. Redis Replication
Redis Master
Redis Slave Redis Slave
Redis Slave Redis Slave
33
- 46. No, but fast enough for you
(if you need the extra features)
43
- 49. Peritor GmbH
Blücherstr. 22, Hof III Aufgang 6
10961 Berlin
Tel.: +49 (0)30 69 20 09 84 0
Fax: +49 (0)30 69 20 09 84 9
Internet: www.peritor.com
E-Mail: info@peritor.com
© Peritor GmbH - Alle Rechte Vorbehalten
Notas del editor
- (that’s not a lot, even for C code)
- (even for C code)
- (old school)
- Strings can’t be longer than 1GB
Lists are implemented as doubly linked lists
Sets are stored as hashesh
- Different datatypes require using different command sets. Not doing so will raise errors.
- Get is wicked fast.
- incr requires parsing of the value
- lset is destructive, replaces the existing element
- List access only through ranges, getting a whole list requires you to fetch the length first.
- Data in Redis isn’t volatile, at least most of the time
- ..and only if necessary.
Data is put into a single dump file.
- Database is dumped into a tempfile, then renamed.
It’s possible to loose data in the dumping period.
- Writes out data after x seconds if at least y number of keys have changed.
On startup the dump is reread into memory.
- Fast, more complex, datatypes
- Redis stores the daemon state and is used for service lookup.