Facebook Twitter

11 Common Web Use Cases Solved in Redis. In How to take advantage of Redis just adding it to your stack Salvatore 'antirez' Sanfilippo shows how to solve some common problems in Redis by taking advantage of its unique data structure handling capabilities.

11 Common Web Use Cases Solved in Redis

Common Redis primitives like LPUSH, and LTRIM, and LREM are used to accomplish tasks programmers need to get done, but that can be hard or slow in more traditional stores. A very useful and practical article. How would you accomplish these tasks in your framework? Show latest items listings in your home page. This is a live in-memory cache and is very fast. The take home is to not endlessly engage in model wars, but see what can be accomplished by composing powerful and simple primitives together. Neo4j: NOSQL For the Enterprise. Luke Melia » Redis in Practice: Who’s Online? Redis is one of the most interesting of the NOSQL solutions.

Luke Melia » Redis in Practice: Who’s Online?

It goes beyond a simple key-value store in that keys’ values can be simple strings, but can also be data structures. Redis currently supports lists, sets and sorted sets. This post provides an example of using Redis’ Set data type in a recent feature I implemented for Weplay, our social youth sports site. The End Result Weplay members were told us they wanted to be able to see which of their friends were online, so we decided to add the feature. Try Redis. TutorialCachingStory - memcached - This is a story of Caching - Memcached.

Ed note: this is an overview of basic memcached use case, and how memcached clients work Two plucky adventurers, Programmer and Sysadmin, set out on a journey.

TutorialCachingStory - memcached - This is a story of Caching - Memcached

Together they make websites. Websites with webservers and databases. Users from all over the Internet talk to the webservers and ask them to make pages for them. The webservers ask the databases for junk they need to make the pages. One day the Sysadmin realizes that their database is sick! Our plucky Sysadmin eyes his webservers, of which he has six. "So now what?

" Our adventurous Programmer grabs the pecl/memcache client library manual, which the plucky Sysadmin has helpfully installed on all SIX webservers. $MEMCACHE_SERVERS = array( "", //web1 "", //web2 "", //web3); Then he makes an object, which he cleverly calls '$memcache'. On Redis, Memcached, Speed, Benchmarks and The Toilet. The internet is full of things: trolls, awesome programming threads, p0rn, proofs of how cool and creative the human beings can be, and of course crappy benchmarks.

On Redis, Memcached, Speed, Benchmarks and The Toilet

In this blog post I want to focus my attention to the latter, and at the same time I'll try to show how good methodology to perform a benchmark is supposed to be, at least from my point of view. Why speed matters? In the Web Scale era everybody is much more obsessed with scalability than speed. That is, if I've something that is able to do handle a (not better defined) load of L, I want it to handle a load of L*N if I use N instances of this thing.

Automagically, Fault tolerantly, Bullet proofly. Choosing innodb_buffer_pool_size. November 3, 2007 by Peter Zaitsev39 Comments My last post about Innodb Performance Optimization got a lot of comments choosing proper innodb_buffer_pool_size and indeed I oversimplified things a bit too much, so let me write a bit better description.

Choosing innodb_buffer_pool_size

Innodb Buffer Pool is by far the most important option for Innodb Performance and it must be set correctly. I’ve seen a lot of clients which came through extreme sufferings leaving it at default value (8M). So if you have dedicated MySQL Box and you’re only using Innodb tables you will want to give all memory you do not need for other needs for Innodb Buffer Pool. This of course assumes your database is large so you need large buffer pool, if not – setting buffer pool a bit larger than your database size will be enough. You also may choose to set buffer pool as if your database size is already larger than amount of memory you have – so you do not forget to readjust it later. Storing hundreds of millions of simple key-value pairs in Redis. Sharding & IDs at Instagram. Shard (database architecture)

Some data within a database remains present in all shards,[notes 1] but some only appears in a single shard.

Shard (database architecture)

Each shard (or server) acts as the single source for this subset of data.[1] A heavier reliance on the interconnect between servers[citation needed]Increased latency when querying, especially where more than one shard must be searched. [citation needed]Data or indexes are often only sharded one way, so that some searches are optimal, and others are slow or impossible. [clarification needed]Issues of consistency and durability due to the more complex failure modes of a set of servers, which often result in systems making no guarantees about cross-shard consistency or durability. [citation needed] In practice, sharding is complex. Where distributed computing is used to separate load between multiple servers (either for performance or reliability reasons), a shard approach may also be useful. This makes replication across multiple servers easy (simple horizontal partitioning does not).