Redis is an open source, advanced key-value store that can be used as a data structure server. It supports various data structures like strings, hashes, lists, sets, and sorted sets. Redis has features like speed, simplicity, reliability and versatility. It can be installed by downloading from the Redis website. The Redis server listens on port 6379 by default. Popular programming languages have client libraries available to connect to Redis. Redis supports different data structures that can be used for applications like caching, sessions, messaging, and more. Data sets in Redis are stored in memory for fast access but can also be persisted to disk for durability.
Self hosted server applications - Adam Horvathadamhorvath
How to get rid of configuration and deployment headaches; How to ease A-B testing, load balancing and testing new versions before rolling out to the public using a simple technique.
- Kerberos is used to authenticate Hadoop services and clients running on different nodes communicating over a non-secure network. It uses tickets for authentication.
- Key configuration changes are required to enable Kerberos authentication in Hadoop including setting hadoop.security.authentication to kerberos and generating keytabs containing principal keys for HDFS services.
- Services are associated with Kerberos principles using keytabs which are then configured for use by the relevant Hadoop processes and services.
Redis and Memcached are both open-source, in-memory key-value data stores used for caching, but they differ in features and use cases. Redis stores data in memory and can persist to disk, supports data types beyond strings like lists and sets, and allows replication. Memcached only stores data in memory and does not support persistence or replication. While both are fast, Redis is more full-featured but requires more memory, making Memcached better for simple caching use cases with high traffic.
Anyone who has tried integrating search in their application knows how good and powerful Solr is but always wished it was simpler to get started and simpler to take it to production.
I will talk about the recent features added to Solr making it easier for users and some of the changes we plan on adding soon to make the experience even better.
This document discusses web servers, including what they are, common features, differences between kernel-mode and user-mode servers, popular server software like Apache, IIS, Nginx, Google Web Server, and Resin. It also covers topics like path translation, load limits, overloads, and the market shares of different server products.
Hadoop Distributed File System (HDFS) is a distributed file system designed to run on commodity hardware. It has very large files (over 100 million files) and is optimized for batch processing huge datasets across large clusters (over 10,000 nodes). HDFS stores multiple replicas of data blocks on different nodes to handle failures. It provides high aggregate bandwidth and allows computations to move to where data resides.
Ravi Namboori Hadoop & HDFS ArchitectureRavi namboori
HDFS Architecture: An HDFS cluster consists of a single NameNode, a master server that manages the file system namespace and regulates access to files by clients.
Here we can see the figure explaining about all by a cisco evangelist Ravi Namboori.
This document provides steps for hardening an Apache web server. It discusses creating a web server group/user, downloading and patching Apache, configuring httpd.conf for security settings like access controls and attack signatures, changing file permissions, cleaning unnecessary files, and advanced security enhancements. Potential problems like denial of service attacks and exploits are also covered. The goal is to guide system administrators on securely configuring Apache to prevent hacking and protect sensitive data.
The Hadoop Distributed File System (HDFS) has a master/slave architecture with a single NameNode that manages the file system namespace and regulates client access, and multiple DataNodes that store and retrieve blocks of data files. The NameNode maintains metadata and a map of blocks to files, while DataNodes store blocks and report their locations. Blocks are replicated across DataNodes for fault tolerance following a configurable replication factor. The system uses rack awareness and preferential selection of local replicas to optimize performance and bandwidth utilization.
This document provides an overview of Hive, including what it is, its supported platforms, required software, how to download, install, configure, and provide examples of using Hive with SQL-like queries on datasets. Hive allows SQL-like querying of data stored in Hadoop via HiveQL queries that are converted into MapReduce jobs under the hood.
These slides were part of a presentation given at HushCon East 2017. The talk covered how we can use big data to improve the effectiveness of offensive security tools.
The document discusses improvements to HDFS that allow it to leverage memory as a storage medium. Key points include:
- HDFS 2.3 introduced memory as a storage medium, with RAM disks providing persistence across restarts.
- HDFS 2.6 introduced storage policies that allow applications to target different storage media like SSD or memory.
- The Centralized Cache Management feature loads hot data into memory pools to enable zero-copy reads.
- The Lazy Persist Writes feature allows applications to write to memory and have HDFS asynchronously write to persistent storage, reducing latency.
- Future work includes improving caching, short-circuit writes, and the Memfs layered file system to provide more flexible
This document discusses DNS cache poisoning. It begins by explaining what DNS is and its purpose of mapping domain names to IP addresses. It then discusses how DNS servers implement caching to improve performance and defines DNS cache poisoning as getting unauthorized entries into a DNS server's cache. The document outlines how an attacker could poison a cache to redirect traffic to a machine they control in order to perform man-in-the-middle attacks or install malware. It describes various methods of poisoning caches locally or remotely, such as between end users and nameservers or between nameservers themselves using the Kaminsky attack. Defenses like DNSSEC are mentioned along with encouragement to try cache poisoning in a controlled lab environment.
Adobe HTTP Streaming is a technology that allows streaming of live and on-demand content over HTTP. It has three main components: content ingest using a File Packager or Live Packager, an Apache server with an HTTP Origin module to deliver files over HTTP, and an OSMF player in Flash or Air to playback the streamed content. The key files used are F4F, F4M, and F4X files containing fragments of encoded media, metadata about the content, and locations of fragments. This allows the benefits of HTTP streaming like adaptive bitrates and seeking combined with HTTP delivery for standard servers and clients.
The document provides an overview of installing and configuring Hadoop for single node, pseudo-distributed, and clustered environments. It describes downloading and extracting Hadoop, configuring Hadoop to run in different modes, starting the Hadoop daemons, and using example applications to test Hadoop functionality. Configuration files for the HDFS, MapReduce, and daemon processes are edited to set up the Hadoop infrastructure.
HBaseCon 2012 | Content Addressable Storages for Fun and Profit - Berk Demir,...Cloudera, Inc.
This document summarizes Berk D. Demir's design for a content addressable storage system to store and serve large amounts of static assets with low latency, high availability, and without data duplication. The key aspects of the design are:
1) Using HBase as the underlying distributed database to store immutable rows of metadata and blob content in a single table with different column families based on access patterns.
2) Addressing content via a cryptographic hash of the content rather than a database key to allow immutable and deduplicated storage.
3) Serving the stored content via HTTP using common verbs and headers to provide a simple interface for clients.
This document discusses measuring and improving drive performance. It describes average access time and data transfer rates for different types of drives like hard drives, CDs, and floppies. It provides tips for optimizing performance through disk optimization, cleaning unnecessary files, scanning for errors, defragmenting disks, and compressing files. The document also outlines different drive interface standards including EIDE, SCSI, USB, and FireWire.
HDFS allows storing large amounts of data across multiple machines by splitting files into blocks and replicating those blocks for reliability. It addresses challenges of big data like volume, velocity, and variety by providing a distributed storage solution that scales horizontally. Traditional systems are limited by network bandwidth, storage capacity of individual machines, and single points of failure. HDFS introduces a scalable architecture with a master NameNode and slave DataNodes that stores data blocks, addressing these issues through data distribution and fault tolerance.
This document discusses strategies for scaling HBase to support millions of regions. It describes Yahoo's experience managing clusters with over 100,000 regions. Large regions can cause problems with tasks distribution, I/O contention during compaction, and scan timeouts. The document recommends keeping regions small and explores enhancements made in HBase to support very large region counts like splitting the meta region across servers and using hierarchical region directories to reduce load on the namenode. Performance tests show these changes improved the time to assign millions of regions.
NGINX is used by more than 130 million websites as a lightweight way to serve web content. Use it to decrease costs, improve performance and open up bottlenecks in web and application server environments without a major architectural overhaul. In this talk, we'll cover the three most basic use cases of static content delivery, application load balancing, and web proxying with caching; and touch on the NGINX maintained Docker container.
This short document promotes creating presentations using Haiku Deck, a tool for making slideshows. It encourages the reader to get started making their own Haiku Deck presentation and sharing it on SlideShare. In a single sentence, it pitches the idea of using Haiku Deck to easily design presentations.
Aplikasi K-cash Wallet menggunakan sistem rekening virtual terhubung dengan jaringan ATM untuk menciptakan transaksi antar perusahaan dan komunitas guna memperluas jangkauan pasar dan layanan melalui kerja sama pemasaran. Aplikasi ini menawarkan keuntungan seperti penjualan tambahan, biaya operasi rendah, dan loyalitas pelanggan yang lebih baik bagi perusahaan mitra.
El documento describe varios problemas ambientales que están ocurriendo en el planeta, incluyendo la destrucción de la capa de ozono debido a los gases de efecto invernadero, lluvias fuertes debido al cambio climático, y la destrucción de bosques para hacer papel y madera. También explica cómo estas acciones están afectando a los animales y la necesidad de plantar más árboles y reducir los desechos para proteger el medio ambiente.
The document provides background information on the YMCA organization and the Ashland YMCA chapter. It details the Ashland YMCA's history, facilities, programs, memberships, staffing, and current marketing situation. It analyzes the Ashland community demographics and notes that the YMCA's biggest demographic is individuals over 65, while those aged 25-35 are the lowest. It also identifies the Kroc Center as the YMCA's main competition. The goal of the public relations campaign is to increase the YMCA's brand awareness in Ashland and attract more visitors through opportunities like partnerships, expanded media presence, and promoting community values. Challenges include limited technology, reluctant management, and an inconsistent messaging voice.
El documento habla sobre la fotografía digital. Explica que las imágenes son capturadas por un sensor electrónico que convierte la luz en una señal digitalizada y almacenada en memoria, a diferencia de la fotografía química que usa película. También menciona dos métodos comunes de revelado digital: Photoshop y Camera Raw. Luego enumera varios efectos y métodos de edición digital como Grunge, HDR, ELE y Vintage.
After burner: A sure-fire way to a great second career after retirementQuantumFly LLC
QuantumFly is world's 1st specialized knowledge sourcing platform for individuals. Retirees can plan to start their second career using QuantumFly and leverage their talent.
This document is a catalog of products from Systhex, a Brazilian dental implant company. It includes information on dental implants, prosthetic components, surgical instruments and kits. Implant types include internal hex, external hex, cone morse, and short implants. Prosthetic components allow for cement-retained and screw-retained restorations. The catalog also provides technical specifications and codes for each item.
The Ashland YMCA seeks to increase brand awareness and membership through a public relations campaign. They aim to promote their facilities and programs to the local community to amplify recognition. Their strategies target specific demographics - parents, children, senior citizens, and individuals ages 25-35. Tactics include open houses, informational sessions, social media promotion, and partnering with local schools and organizations. The goal is to increase class participation by 3-5% and membership sales.
This document discusses technical solutions for managed aquifer recharge (MAR) facilities that were identified through the MARSOL project inventory. It proposes solutions to increase infiltration rates, effectiveness, and provide design criteria. These include micro-topography studies, passive recharge systems, pre-treatment filters, pH control filters, reusing existing wells, and controlling groundwater levels with dams. Operational solutions aim to avoid gas clogging, control spillways, and manage infiltration based on rainfall. The document also summarizes techniques from other MAR experiences related to water quantity and quality management of receiving soils and aquifers. It concludes that negative environmental impacts can be addressed through sustainable aquifer storage and transfer techniques, new designs, and management changes.
This document discusses Florida's efforts to implement electronic laboratory ordering and reporting for newborn screening tests from hospitals to the Florida Department of Health. It aims to improve efficiency and timeliness of test result reporting. The project involves developing interfaces between hospital systems and the Florida DOH database. It summarizes the history of reporting for newborn hearing screening and critical congenital heart disease screening. Challenges include hearing data not always being in hospital systems, while successes involve pulse oximetry data availability and support from hospital newborn screening staff. Standards, infrastructure, and past integration experience are leveraged to enable this new partnership and collaboration.
O documento discute autômatos celulares e o jogo da vida. Apresenta as definições de autômatos e suas características, tipos, e exemplos como o jogo da vida. O jogo da vida simula nascimento, morte e sobrevivência de células de acordo com regras simples de vizinhança. Após várias gerações, padrões complexos podem surgir das interações entre as células.
Dokumen tersebut membahas tentang sensasi dan persepsi. Sensasi adalah deteksi energi fisik oleh indera, sedangkan persepsi adalah interpretasi sensorik menjadi pola bermakna melalui proses kognitif. Dokumen juga menjelaskan proses transduksi, adaptasi, dan faktor-faktor yang mempengaruhi sensasi dan persepsi seperti kebutuhan, budaya, emosi.
Redis is an in-memory data structure store that can be used as a database, cache, message broker, and more. It supports many data structures like strings, hashes, lists, sets, and sorted sets. The document discusses using Redis for queues, real-time analytics, leaderboards, tracking online users and friends, distributed locking, and sharing experiences using Redis for a large social game with millions of daily users. Redis provides fast, predictable performance for intensive read/write applications where data fits in memory.
Redis is an open source advanced key-value store, created by antirez. Here is a quick overview of this awesome NoSql DB.
Like a swiss knife, Redis will help you by many ways : LRU cache, high scores, UID generator, queues, social feeds, autocomplete …
Speed up your Symfony2 application and build awesome features with RedisRicard Clau
Redis is an extremely fast data structure server that can be easily added to your existing stack and act like a Swiss army knife to help solve many problems that would be extremely difficult to workaround with the traditional RDBMS. In this session we will focus on what Redis is, how it works, what awesome features we can build with it and how we can use it with PHP and integrate it with Symfony2 applications making them blazing fast.
Quick-and-Easy Deployment of a Ceph Storage ClusterPatrick Quairoli
Quick & Easy Deployment of a Ceph Storage Cluster with SUSE Enterprise Storage
The document discusses deploying a Ceph storage cluster using SUSE Enterprise Storage. It begins with an introduction to Ceph and how it works as a distributed object storage system. It then covers designing Ceph clusters based on workload needs and measuring performance. The document concludes with step-by-step instructions for deploying a basic three node Ceph cluster with monitoring using SUSE Enterprise Storage.
10 Ways to Scale Your Website Silicon Valley Code Camp 2019Dave Nielsen
Redis has 10 different data structures (String, Hash, List, Set, Sorted Set, Bit Array, Bit Field, Hyperloglog, Geospatial Index, Streams) plus Pub/Sub and many Redis Modules. In this talk, Dave will give 10 examples of how to use these data structures to scale your website. I will start with the basics, such as a cache and User session management. Then I demonstrate user generated tags, leaderboards and counting things with hyberloglog. I will with a demo of Redis Pub/Sub vs Redis Streams which can be used to scale your Microservices-based architecture.
Technical overview of three of the most representative KeyValue Stores: Cassandra, Redis and CouchDB. Focused on Ruby and Ruby on Rails developement, this talk shows how to solve common problems, the most popular libraries, benchmarking and the best use case for each one of them.
This talk was part of the Conferencia Rails 2009, Madrid, Spain.
http://app.conferenciarails.org/talks/43-key-value-stores-conviertete-en-un-jedi-master
10 Ways to Scale with Redis - LA Redis Meetup 2019Dave Nielsen
Redis has 10 different data structures (String, Hash, List, Set, Sorted Set, Bit Array, Bit Field, Hyperloglog, Geospatial Index, Streams) plus Pub/Sub and many Redis Modules. In this talk, Dave will give 10 examples of how to use these data structures to scale your website. I will start with the basics, such as a cache and User session management. Then I demonstrate user generated tags, leaderboards and counting things with hyberloglog. I will with a demo of Redis Pub/Sub vs Redis Streams which can be used to scale your Microservices-based architecture.
Add Redis to Postgres to Make Your Microservices Go Boom!Dave Nielsen
Slides for talk delivered at PostgresOpen 2018 in San Francisco https://postgresql.us/events/pgopen2018/schedule/session/538-add-redis-to-postgres-to-make-your-microservice-go-boom/
Big Data Warehousing Meetup: Securing the Hadoop Ecosystem by ClouderaCaserta
In our recent Big Data Warehousing Meetup, we discussed Data Governance, Compliance and Security in Hadoop.
As the Big Data paradigm becomes more commonplace, we must apply enterprise-grade governance capabilities for critical data that is highly regulated and adhere to stringent compliance requirements. Caserta and Cloudera shared techniques and tools that enables data governance, compliance and security on Big Data.
For more information, visit www.casertaconcepts.com
The document provides an overview of Redis, including:
- Redis is an in-memory database that supports data structures like strings, lists, sets, and hashes. It is often used for caching, messaging, and building real-time applications.
- Major companies like Twitter, GitHub, and Pinterest use Redis for its speed and support for complex data types.
- Redis can be deployed in standalone, master-slave, or cluster topologies to provide redundancy, scaling, and automatic failover. Persistence to disk can be configured using snapshots or append-only files.
- Redis offers advantages over other databases and caching solutions in terms of performance, data types, scalability, and availability. It has a simple
Big Data Developers Moscow Meetup 1 - sql on hadoopbddmoscow
This document summarizes a meetup about Big Data and SQL on Hadoop. The meetup included discussions on what Hadoop is, why SQL on Hadoop is useful, what Hive is, and introduced IBM's BigInsights software for running SQL on Hadoop with improved performance over other solutions. Key topics included HDFS file storage, MapReduce processing, Hive tables and metadata storage, and how BigInsights provides a massively parallel SQL engine instead of relying on MapReduce.
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Redis Labs
This document summarizes a presentation about Redis version 6 and beyond. Some key points include:
- Redis version 6 includes new features like ACL for security, client-side caching, diskless replication, and multi-threaded I/O.
- Redis is positioned as both a cache and a database due to its speed, data structures, and ability to handle complex data models through modules.
- Redis Enterprise provides additional capabilities like durability, high availability, geo-distribution, security and multi-tenancy.
- Modern data models in Redis modules include Streams, RediSearch, RedisGraph, RedisTimeSeries, RedisAI, RedisJSON and RedisBloom.
- RedisInsight is
Redis is an in-memory key-value data store that can be used for caching, sessions, queues, leaderboards, and more. It provides fast performance due to being memory-resident and supporting different data structures like strings, hashes, lists, sets, and sorted sets. Redis is useful for read-heavy and real-time applications but may not be suitable if data does not fit in memory or for relational data needs. The presentation discusses using Redis with PHP and Symfony, data sharding strategies, and war stories from a social game with 7.5M daily users.
Hadoop & no sql new generation database systemsramazan fırın
This document provides a summary of a presentation about Hadoop, NoSQL databases, and graph databases. It discusses how big data is driving new database technologies like Hadoop and NoSQL to process large datasets. Specific NoSQL databases mentioned include MongoDB, Cassandra, Redis, CouchDB, HBase, and Neo4j. Use cases for telecommunications companies are discussed, like using big data to prevent customer churn, target customized campaigns, and gain more customers. A demo of these technologies is also included on the agenda.
Redis is a fast, in-memory key-value store that can be used as a cache, message broker, and centralized locking system. It stores data in memory for high performance, but can also asynchronously write data to disk for persistence. Redis supports data types like strings, lists, sets and sorted sets. It enables high availability through master-slave replication and horizontal scaling through sharding of data across multiple nodes.
Peek behind the scenes to learn about Amazon ElastiCache's design and architecture. See common design patterns of our Memcached and Redis offerings and how customers have used them for in-memory operations and achieved improved latency and throughput for applications. During this session, we review best practices, design patterns, and anti-patterns related to Amazon ElastiCache.
CIS13: Big Data Platform Vendor’s Perspective: Insights from the Bleeding EdgeCloudIDSummit
Aaron T. Myers (ATM), Software Engineer, Cloudera, Inc.
The era of “Big Data for the masses” is upon us. Despite the mindshare Big Data has been receiving – driven by the development and distribution of Apache Hadoop, the first commercialized release was only in December of 2011 by Cloudera, Inc. Cloudera remains the leading Hadoop platform provider in the market today. Now, with a diverse enterprise and government early adopter customer list, through Cloudera we can get a bird’s eye view of the leading authentication issues beginning to emerge from these companies headed out of the sandbox and into full production.
Speaker Aaron T. Myers (ATM) was one of Cloudera’s earliest engineers and maintains a core focus on Apache Hadoop core, specifically focused on HDFS and Hadoop’s security features. ATM is an Apache Hadoop PMC Member and Committer.
2. What REDIS is ?
• REDIS is an open source, BSD licensed,
advanced key-value store. It is often referred
to as data structure server since keys can
contain String, Hashes, List, Sets and Sorted
sets..
• REDIS stands for REmote DIctionary Server
4. How to Install and Start REDIS server,
REDIS client and Bindings
• Go to http://redis.io/download and download
• Start Redis server ( TCP server, Single
Threaded, Listens on default port 6379 ).
• Command – redis-server <path to conf. file )
• Bundled REDIS client – redis-cli
• Client bindings available for all popular
languages, Java, Python, Ruby, Scala, Ruby,
Eralang, Go ..( I am running out of space )
6. Strings
• Set Key “Value” ( 4 billion Keys )
• Get Key returns “Value”
• Del Key
• Fetch Multiple Keys at once … MGET
• Set EXPIRATION key, e.g. Expire Key 5
• Command TTL returns remaining time before
key expires
7. Use Case for Expire, TTL
• Cache – LRU
http://antirez.com/post/redis-as-LRU-
cache.html
• Storage for Session ( HTTP or others ..)
9. Usage of INCR
• Great Use case Global Counters ( Download, Hits,
Votes ..)
• INCR downloads:total
• INCR downloads:total:today
• INCR downloads:total:2011-05-10
• INCR downloads:/downloads/file1.mpg:total
• INCR downloads:/downloads/file1.mpg:today
• INCR downloads:/downloads/file1.mpg:2011-05-
10
10. Counters
# Total downloads for server, all time
• GET downloads:total
# Total downloads for server, today
• GET downloads:total:today
# Total downloads for file
• GET downloads:/downloads/file1.mpg:total
# Total downloads for file today
• GET downloads:/downloads/file1.mpg:today
11. How do you reset daily counter ?
# Expire at 2011-05-10 23:59:59
• EXPIREAT downloads:total:today 1305064799
12. One more Use Case – API rate Limiting
• $ curl http://api.example.com/list.json
• INCR api:<TOKEN>:hits
1
• Pseudo-Code
if INCR('api:abc123:hits') > LIMIT
return 420 Enhance Your Calm
end
13. One more Use case Generating unique
IDs
• INCR global:users_ids
1
• SET users:1:username "john"
• INCR global:users_ids
2
• SET users:2:username "mary”
14. List
• LPUSH key 1
1
• LPUSH Key 2
2
• LPUSH Key 3
3
• RPOP Key
What should I get ?
• LPOP Key
What should I get ?
• LLEN Key ( Length if List )
• LRANGE key 0 -1
• LTRIM 0 1
15. Usage of List
• Indexes ( List of comments ..)
LPUSH article:comments <ID>
Timelines (of all sorts: messages, logs, ...)
LPUSH user:<ID>:inbox "message from Alice"
LPUSH user:<ID>:inbox "message from Bob"
# Limit the messages to 100
LTRIM user:<ID>:inbox 0 99
# Get last 10 messages
LRANGE user:<ID>:inbox 0 9
# Get next 10 messages
LRANGE user:<ID>:inbox 10 19
16. List is “Queue”
Publisher
• RPUSH queue “task-1”
• RPUSH queue “task-2”
Worker ( blocks and waits for tasks, 0 means
waits for ever )
• BLPOP queue 0
20. Set Usages - Relationship
• SADD users:A:follows B
• SADD users:B:follows C
• SADD users:B:follows D
• SADD users:C:follows A
• SADD users:C:follows D
21. Set Relationship
• Joint network of A & B
SUNION users:A:follows users:B:follows
“C”,”D”,”B”
• Common for A & B
SINTER users:B:follows users:C:follows
[]
• Unique to B compared to C
“C”
22. Set – Friends & Followers
# Whom “swid1” follows
• SADD swid1:follows A
• SADD swid1:follows B
# Who are friends of “swid1”
• SADD swid1:friend C
• SADD swid1:friend B
# Whom swid1 follows and he is friend
• SINTER swid1:follows swid1:friend “B”
# Whom swid1 follows and he is not friend
• SDIFF swid1:follows swid1:friend “A”
# Whom Swid1 is friend with but does not follow
• SDIFF swid1:friend swid1:follows “C”
23. Sorted Set
• ZADD key 100 A
• ZADD key 10 C
• ZADD key 80 B
• ZRANGE key 0 -1 “C”, “B”, “A”
• ZREVANGE key 0 -1 “A”, “B”, “C”
• ZINCRBY key 10 C “20”
25. Leaderboards
# User A got 10 points
ZINCRBY scores 10 A
# User B got 15 points
ZINCRBY scores 15 B
# User A got another 10 points
ZINCRBY scores 10 A
# Display scores
ZREVRANGE scores 0 -1 WITHSCORES
1) "A" 2) "20" 3) "B" 4) "15"
26. Hashes
• Redis Hashes are maps string filed and string
values.
• This data type is perfect to represent an
object.
• A hash with few fields ( 100s ) is stored in a
way that takes very little space so you can
store millions of object is small REDIS
instances.
27. REDIS Hash commands
• HMSET user:1001 username john cid 1234
dept finance eaccount 5000
• HMGET user:1001 username cid ( Multi-field
GETs )
• HINCRBY user:1001 eaccount 5 ( Incrementing
specific field )
• HGET user:1001 eaccount ( Get specific field )
• HSETNX user:1001 username
28. REDIS - Persistence
• All datasets are stored in Memory like
Memcached, extremely fast read/write
operations.
• Datasets can be saved to Disk, Two ways
– RDB
– AOF ( Append only File )
29. RDB snapshots and AOF logs
• Persistence REDIS is a matter of configuration,
balancing the trade-off between performance,
disk I/O and data durability.
– RDB is a very compact single-file point-in-time
representation of REDIS dataset.
– AOF is a simple text log of write operations.
30. REDIS HA
• REDIS support Master/Slave configuration for HA
• Master can have multiple Slaves and Slaves can also be
connected other slaves in Graph like structure.
• REDIS replication is non-blocking on Master and Slave side.
• Replication is used both for scalability or data redundancy.
• To configure Slave is very simple just needs to add following to
slave configuration file,
Slaveof <ip-addr-of-server> 6379
• By default slaves are read only.
• What if Master fails ? How do client behave ? What are
options ?
31. Redis Scalability
• Client Side Sharding – Client shards key based on number of
Redis servers. This is static partitioning. Each Server is
configured with Master/Slave for redundancy.
• Server Side Sharding – twemproxy
(https://github.com/twitter/twemproxy) by Tweeter,
Consistent Hashing implementation. Another resource
http://antirez.com/news/44.
• Redis sever Pre-Sharding strategy - e.g Pinterest
• Great resource to start - http://redis.io/topics/partitioning.
• Many options.. Roll your Own which meets needs..
32. How to Monitor REDIS ?
• Local Monitoring : Monitd to monitor REDIS instance locally.
Restart if process fails. AS team has prototype for this.
• Remote Monitoring and Integration with Zenoss -
https://community.zenoss.org/docs/DOC-5333.
• Accessing REDIS metrics – Start redis-cli – info command with
following options, server, clients, memory, persistence, stats,
replication, cpu, commandstats, cluster,keyspace
• Many commercial SAAS vendors, DATADOG, LIBRATO, more
analysis and statistical Metrics collection.
33. REDIS as a Service
• Redislabs - http://redislabs.com/
• Amazon Elastic Cache service -
http://aws.amazon.com/about-aws/whats-
new/2013/09/04/amazon-elasticache-for-
redis/
34. How to Measure REDIS performance ?
• Redis-benchmark is a tool which comes
bundled with Redis installation.
• Check out at
http://redis.io/topics/benchmarks.
• This tool simulates N client sending M queries.
• Let us run.. See what happens.
35. Other feature of REDIS
• Transactions
– MULTI,EXEC,DISCARD AND WATCH are the transactions in Redis.
– Redis transactions are atomic.
– Redis transactions are started with MULTI command and then all
commands are executed once EXEC is executed.
• LUA scripting
– Lua scripting is used to implement custom command and/or
extension. This is very similar to stored procedure in RDBMS.
– Redis Lua interpreter loads seven libraries:
base,string,table,math,debug,cjson and cmsgpack.
36. Summary
• Redis offers excellent caching and persistence
options along with various data structure for
applications.
• This is true Lego building block for a service
developer. Use case is only limited by
imagination.
• At least start with, replacing Memcached.
• Excellent Live Documentation..check it out
http://redis.io