Posts

Showing posts with the label memcached

Memcached with Scala Shade

Image
Memcached is a powerful and battle-tested key-value store. Netflix is one of the many companies that use Memcached at scale. Memcached has a simple design and yet powerful. Redis is great because of the commands and data structure diversity however Redis is not multi-thread and Memcached is. Thats the biggest advantage of Memcached. Scala, it's a powerful and complete modern post-functional language for the JVM. Today I want to show how we can use MemcacheD and Scala together using the Shade library. Shade is part of monix which is a functional multi-thread solution. Today I made a video showing how we can use Memcached and shade in Scala using SBT as a build system. So without further due, let's get started. 

Netflix Dynomite/Dyno: The Cluster for Redis

Image
Dynomite is brilliant. Kudos for NetflixOSS team because it kicks ass. First all they mixed several interesting, battle tested and sexy architectural ideas and deliver into a single solution. What would be Dynomite? You can think as a kick Ass Cluster for Memcached and Redis. But its way more than that. Dynomite is integrated with the Netflix Stack so you can use with Eureka and the rest of the stack. You dont need use Redis or Memcached if you dont want because Dynomite is modular so you can use the NoSQL or thing behind it. Dynomite is based on the Amazon Dynamo paper, so it implements the Consistence Hashing Ring, with quorum-like mechanisms, so you can have strong consistency and dont loss data(similar to Cassandra and Riak ) and also have some low latency and high throughput using Redis or Memcached Behind. Dynomite is written in C and its a proxy, it uses the twitter twemproxy as base solution. Replication is a aymetric, dynomite has a java client called Dyno with has...

Some fun with Memcached

Image
Memcahed is a K/V store. Its fast pretty much all operations are O(1). Memcached use Threads(Async and non-blocking IO ) different from Redis with is single-thread. Memcached does not have a cluster, its a farm, some concerns like Replication need be handled by the clients or 3rd party application, nodes on the farm don't talk o each other so there is no GOSSIP . Memcached has few key/set operations in comparison with Redis . Redis have several. Some clients have the concept of the master-key / sub-key based on this it can locate what server has that specific key. Often keys are smaller than 250 chars and objects smaller than 1MB. Memcached if used for a lot lot of scenarios like: Profile Caching(Social Networking), Page Caching(HTML), Ad Targeting with cookie / profile tracking, Session caching for games and entertainment its pretty much for caching.