SlideShare una empresa de Scribd logo
1 de 23
New York Redis Meetup
Welcome Session
   June 26, 2012

   @ayampolskiy
    @dannygnj
Who Are We?
 Aleksandr Yampolskiy
 •CTO of Cinchcast, BlogTalkRadio, and Cinch.FM
 companies that provide solutions to create, share, measure,
 and monetize audio content.
 •Previously head of security and compliance for Gilt
 Groupe companies
 •Various leadership roles in Goldman Sachs, Oracle,
 Microsoft building scalable, enterprise software for IDM,
 SSO, AuthN/AuthZ.
 •Ph.D. in Cryptography

 Danny Gershman
 •Senior Software Engineer at Cinchcast
 •Previously held position as Lead Software Engineer at The
 NewsMarket and Synaptic Digital
 •Systems Architect at Innovative Systems & Solutions
 •Specializing in web technologies, caching, and scale.
What is This Meetup?
• New York REDIS NOSQL Meetup
• Topics of interest: REDIS, NOSQL,
  Engineering, Entrepreneurs, Open-Source
What Do You Want to Get Out Of It?
What is REDIS?
•   Database?
•   Caching?
•   Pub/Sub?
•   Key/Value Store?
•   Redis is more like a flexible
    tool designed to solve
    specific problems
REDIS
REmote DIctionary Server  (www.redis.io)
Key-Value Store “on steroids”
Written by Salvatore Sanfilippo (@antirez) in
2009. Now up to 2.4.13
Redis Manifesto
– Redis is a DSL (Domain Specific Language) that manipulates
  abstract data types and implemented as a TCP daemon. Keys
  are binary-safe strings and values are different kinds of
  abstract data types.
– Redis has persistence option but Memory storage is #1.
– The Redis API is a direct consequence of fundamental data
  structures.
– Code is like a poem.
– We believe designing systems is a fight against complexity.
  Most of the time the best way to fight complexity is by not
  creating it at all.
– Redis API has two levels: 1) a subset of the API fits naturally
  into a distributed version of Redis and 2) a more complex API
  that supports multi-key operations.
– We optimize for joy. When there is no longer joy in writing
  code, the best thing to do is stop.
                                                             7
REDIS is Fast

• Fast ~100,000 queries per sec.

• Compare it with ~30,000 queries per sec
  for MS SQL Server (if you are lucky)

• Kind of like memcached, but values can
  be persisted and all keys are kept IN
  MEMORY.
Modern Computer Latency
                L1          3 cycles
 Non-blocking




                L2          14 cycles

                RAM         250 cycles

                DISK        41,000,000 cycles
 Blocking




                NETWO 240,000,000 cycles
                RK
                       Ryan Dahl, Yahoo BayJax meetup, May 2010
Redis VS Memcached




                     10
Who is using REDIS?




                      11
Data structures
Keys are strings which identify pieces of data
(values)

Values can be strings, integers, hashes, lists,
sets, or sorted sets

Various atomic operations (push, pop, add,
read, set, etc.) – after all REDIS is single-
threaded
                                                  12
Many Language Bindings
REDIS is Simple
Scale
Horizontal (multiple processes)

Vertical (master-slave)

Master-master via zookeeper
Master-Master Replication
Native Redis Master-Master replication doesn’t
exist yet, slated for release end of year

Solution using Apache Zookeeper (
http://zookeeper.apache.org/)


Checks for status using BLPOP

Will promote a slave to master
When Not to Use Redis
Data is larger than memory

Need ACID requirements

Big data
Security Concerns
It is designed to be used only inside trusted
environment (kind of like MongoDB)

Basic password authentication (but it’s sent in
cleartext)

No data encryption support



                                                  18
Security Recommendations
Configure firewall to block inbound access on
REDIS ports

Don’t run REDIS server as root, and harden the
server it’s on

Don’t store sensitive data in there.



                                                 19
AOP Caching
• Dynamically construct a hash key from argument
  values.
• “Round up” volatile keys such as timestamps
• Put into REDIS cache with a configurable TTL
• Lookup from cache before SQL server + lazy writes.
Real-time Analytics
Communicate from hydrating application

NodeJS listens to Redis and transmits data
to a page using Socket.IO

Historical data is stored in Redis

Pub/Sub is used to notify listening sockets
Studio Callers
Cinchcast is Hiring
•   Well-funded profitable startup      Open Positions:
    used by millions.
                                        •Back-end Architect
•   Patented technology utilized in a
    new way.                            •Lead Front-end Engineer
•   Medical/dental/etc. benefits.
•   Great office space in mid-town
                                        •If you are good we’ll find a role
    right near subway.
•   Flexible hours. Top-notch
                                        for you : jobs@cinchcast.com
    compensation + stock options.

Más contenido relacionado

La actualidad más candente

RedisConf17- Zettaset + Redis - Protecting Redis Enterprise while Maintaining...
RedisConf17- Zettaset + Redis - Protecting Redis Enterprise while Maintaining...RedisConf17- Zettaset + Redis - Protecting Redis Enterprise while Maintaining...
RedisConf17- Zettaset + Redis - Protecting Redis Enterprise while Maintaining...
Redis Labs
 

La actualidad más candente (20)

Red Hat Storage: Emerging Use Cases
Red Hat Storage: Emerging Use CasesRed Hat Storage: Emerging Use Cases
Red Hat Storage: Emerging Use Cases
 
RedisConf17- Zettaset + Redis - Protecting Redis Enterprise while Maintaining...
RedisConf17- Zettaset + Redis - Protecting Redis Enterprise while Maintaining...RedisConf17- Zettaset + Redis - Protecting Redis Enterprise while Maintaining...
RedisConf17- Zettaset + Redis - Protecting Redis Enterprise while Maintaining...
 
Containerized Storage
Containerized StorageContainerized Storage
Containerized Storage
 
Red Hat Storage Day LA - Performance and Sizing Software Defined Storage
Red Hat Storage Day LA - Performance and Sizing Software Defined Storage Red Hat Storage Day LA - Performance and Sizing Software Defined Storage
Red Hat Storage Day LA - Performance and Sizing Software Defined Storage
 
Why Software-Defined Storage Matters
Why Software-Defined Storage MattersWhy Software-Defined Storage Matters
Why Software-Defined Storage Matters
 
Why Software-Defined Storage Matters
Why Software-Defined Storage MattersWhy Software-Defined Storage Matters
Why Software-Defined Storage Matters
 
Red Hat Storage Day LA - Why Software-Defined Storage Matters and Web-Scale O...
Red Hat Storage Day LA - Why Software-Defined Storage Matters and Web-Scale O...Red Hat Storage Day LA - Why Software-Defined Storage Matters and Web-Scale O...
Red Hat Storage Day LA - Why Software-Defined Storage Matters and Web-Scale O...
 
Redis Modules - Redis India Tour - 2017
Redis Modules - Redis India Tour - 2017Redis Modules - Redis India Tour - 2017
Redis Modules - Redis India Tour - 2017
 
Say Yes To No SQL
Say Yes To No SQLSay Yes To No SQL
Say Yes To No SQL
 
Group04 (4)
Group04 (4)Group04 (4)
Group04 (4)
 
DUG'20: 13 - HPE’s DAOS Solution Plans
DUG'20: 13 - HPE’s DAOS Solution PlansDUG'20: 13 - HPE’s DAOS Solution Plans
DUG'20: 13 - HPE’s DAOS Solution Plans
 
Doing More With Less: The Economics of Open Source Database Adoption
Doing More With Less: The Economics of Open Source Database AdoptionDoing More With Less: The Economics of Open Source Database Adoption
Doing More With Less: The Economics of Open Source Database Adoption
 
Red hat Storage Day LA - Designing Ceph Clusters Using Intel-Based Hardware
Red hat Storage Day LA - Designing Ceph Clusters Using Intel-Based HardwareRed hat Storage Day LA - Designing Ceph Clusters Using Intel-Based Hardware
Red hat Storage Day LA - Designing Ceph Clusters Using Intel-Based Hardware
 
GlusterFS as a DFS
GlusterFS as a DFSGlusterFS as a DFS
GlusterFS as a DFS
 
Red Hat Storage Day Seattle: Persistent Storage for Containerized Applications
Red Hat Storage Day Seattle: Persistent Storage for Containerized ApplicationsRed Hat Storage Day Seattle: Persistent Storage for Containerized Applications
Red Hat Storage Day Seattle: Persistent Storage for Containerized Applications
 
Database Containerization Platform Checklist
Database Containerization Platform ChecklistDatabase Containerization Platform Checklist
Database Containerization Platform Checklist
 
Group04
Group04Group04
Group04
 
Group04
Group04Group04
Group04
 
Hedvig & ClusterHQ - Persistent, portable storage for Docker
Hedvig & ClusterHQ - Persistent, portable storage for DockerHedvig & ClusterHQ - Persistent, portable storage for Docker
Hedvig & ClusterHQ - Persistent, portable storage for Docker
 
Storage for Containerized Applications
Storage for Containerized Applications Storage for Containerized Applications
Storage for Containerized Applications
 

Similar a New York REDIS Meetup Welcome Session

Redis everywhere - PHP London
Redis everywhere - PHP LondonRedis everywhere - PHP London
Redis everywhere - PHP London
Ricard Clau
 
Redis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHPRedis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHP
Ricard Clau
 
start_your_datacenter_sds_v3
start_your_datacenter_sds_v3start_your_datacenter_sds_v3
start_your_datacenter_sds_v3
David Byte
 
Engineering Presentation for Careers@Directi
Engineering Presentation for Careers@DirectiEngineering Presentation for Careers@Directi
Engineering Presentation for Careers@Directi
Directi Group
 

Similar a New York REDIS Meetup Welcome Session (20)

Redis everywhere - PHP London
Redis everywhere - PHP LondonRedis everywhere - PHP London
Redis everywhere - PHP London
 
Redis meetup
Redis meetupRedis meetup
Redis meetup
 
Redis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHPRedis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHP
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]
 
What's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis LabsWhat's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis Labs
 
2016 August POWER Up Your Insights - IBM System Summit Mumbai
2016 August POWER Up Your Insights - IBM System Summit Mumbai2016 August POWER Up Your Insights - IBM System Summit Mumbai
2016 August POWER Up Your Insights - IBM System Summit Mumbai
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Cost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWSCost Savings at High Performance with Redis Labs and AWS
Cost Savings at High Performance with Redis Labs and AWS
 
Moving Beyond Cache by Yiftach Shoolman - Redis Day Bangalore 2020
Moving Beyond Cache by Yiftach Shoolman - Redis Day Bangalore 2020Moving Beyond Cache by Yiftach Shoolman - Redis Day Bangalore 2020
Moving Beyond Cache by Yiftach Shoolman - Redis Day Bangalore 2020
 
start_your_datacenter_sds_v3
start_your_datacenter_sds_v3start_your_datacenter_sds_v3
start_your_datacenter_sds_v3
 
Nashville analytics summit aug9 no sql mike king dell v1.5
Nashville analytics summit aug9 no sql mike king dell v1.5Nashville analytics summit aug9 no sql mike king dell v1.5
Nashville analytics summit aug9 no sql mike king dell v1.5
 
Real time Object Detection and Analytics using RedisEdge and Docker
Real time Object Detection and Analytics using RedisEdge and DockerReal time Object Detection and Analytics using RedisEdge and Docker
Real time Object Detection and Analytics using RedisEdge and Docker
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
 
Talent42 2014 Sam Wholley -
Talent42 2014 Sam Wholley - Talent42 2014 Sam Wholley -
Talent42 2014 Sam Wholley -
 
Redis Labcamp
Redis LabcampRedis Labcamp
Redis Labcamp
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
 
Add Redis to Postgres to Make Your Microservices Go Boom!
Add Redis to Postgres to Make Your Microservices Go Boom!Add Redis to Postgres to Make Your Microservices Go Boom!
Add Redis to Postgres to Make Your Microservices Go Boom!
 
Redis by-hari
Redis by-hariRedis by-hari
Redis by-hari
 
The IBM Data Engine for NoSQL on IBM Power Systems™
The IBM Data Engine for NoSQL on IBM Power Systems™The IBM Data Engine for NoSQL on IBM Power Systems™
The IBM Data Engine for NoSQL on IBM Power Systems™
 
Engineering Presentation for Careers@Directi
Engineering Presentation for Careers@DirectiEngineering Presentation for Careers@Directi
Engineering Presentation for Careers@Directi
 

Más de Aleksandr Yampolskiy

"Managing software development" by Peter Bell
"Managing software development" by Peter Bell"Managing software development" by Peter Bell
"Managing software development" by Peter Bell
Aleksandr Yampolskiy
 
Malware Goes to the Movies - Briefing
Malware Goes to the Movies - BriefingMalware Goes to the Movies - Briefing
Malware Goes to the Movies - Briefing
Aleksandr Yampolskiy
 
Eight simple rules to writing secure PHP programs
Eight simple rules to writing secure PHP programsEight simple rules to writing secure PHP programs
Eight simple rules to writing secure PHP programs
Aleksandr Yampolskiy
 
Inoculation strategies for victims of viruses
Inoculation strategies for victims of virusesInoculation strategies for victims of viruses
Inoculation strategies for victims of viruses
Aleksandr Yampolskiy
 
Threshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsThreshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random Permutations
Aleksandr Yampolskiy
 
Secure information aggregation in sensor networks
Secure information aggregation in sensor networksSecure information aggregation in sensor networks
Secure information aggregation in sensor networks
Aleksandr Yampolskiy
 
A verifiable random function with short proofs and keys
A verifiable random function with short proofs and keysA verifiable random function with short proofs and keys
A verifiable random function with short proofs and keys
Aleksandr Yampolskiy
 
Towards a theory of data entangelement
Towards a theory of data entangelementTowards a theory of data entangelement
Towards a theory of data entangelement
Aleksandr Yampolskiy
 

Más de Aleksandr Yampolskiy (20)

"Managing software development" by Peter Bell
"Managing software development" by Peter Bell"Managing software development" by Peter Bell
"Managing software development" by Peter Bell
 
Recruiting Great Engineers in Six Easy Steps
Recruiting Great Engineers in Six Easy StepsRecruiting Great Engineers in Six Easy Steps
Recruiting Great Engineers in Six Easy Steps
 
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing ItYou Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
 
Malware Goes to the Movies - Briefing
Malware Goes to the Movies - BriefingMalware Goes to the Movies - Briefing
Malware Goes to the Movies - Briefing
 
Privacy and E-Commerce
Privacy and E-CommercePrivacy and E-Commerce
Privacy and E-Commerce
 
Eight simple rules to writing secure PHP programs
Eight simple rules to writing secure PHP programsEight simple rules to writing secure PHP programs
Eight simple rules to writing secure PHP programs
 
Social media security challenges
Social media security challengesSocial media security challenges
Social media security challenges
 
Social Engineering and What to do About it
Social Engineering and What to do About itSocial Engineering and What to do About it
Social Engineering and What to do About it
 
OWASP Much ado about randomness
OWASP Much ado about randomnessOWASP Much ado about randomness
OWASP Much ado about randomness
 
Malware goes to the movies
Malware goes to the moviesMalware goes to the movies
Malware goes to the movies
 
Inoculation strategies for victims of viruses
Inoculation strategies for victims of virusesInoculation strategies for victims of viruses
Inoculation strategies for victims of viruses
 
Number theory lecture (part 1)
Number theory lecture (part 1)Number theory lecture (part 1)
Number theory lecture (part 1)
 
Number theory lecture (part 2)
Number theory lecture (part 2)Number theory lecture (part 2)
Number theory lecture (part 2)
 
Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?
 
Threshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random PermutationsThreshold and Proactive Pseudo-Random Permutations
Threshold and Proactive Pseudo-Random Permutations
 
Secure information aggregation in sensor networks
Secure information aggregation in sensor networksSecure information aggregation in sensor networks
Secure information aggregation in sensor networks
 
A verifiable random function with short proofs and keys
A verifiable random function with short proofs and keysA verifiable random function with short proofs and keys
A verifiable random function with short proofs and keys
 
Towards a theory of data entangelement
Towards a theory of data entangelementTowards a theory of data entangelement
Towards a theory of data entangelement
 
Price of anarchy is independent of network topology
Price of anarchy is independent of network topologyPrice of anarchy is independent of network topology
Price of anarchy is independent of network topology
 
Business Case Studies
Business Case Studies Business Case Studies
Business Case Studies
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

New York REDIS Meetup Welcome Session

  • 1. New York Redis Meetup Welcome Session June 26, 2012 @ayampolskiy @dannygnj
  • 2. Who Are We? Aleksandr Yampolskiy •CTO of Cinchcast, BlogTalkRadio, and Cinch.FM companies that provide solutions to create, share, measure, and monetize audio content. •Previously head of security and compliance for Gilt Groupe companies •Various leadership roles in Goldman Sachs, Oracle, Microsoft building scalable, enterprise software for IDM, SSO, AuthN/AuthZ. •Ph.D. in Cryptography Danny Gershman •Senior Software Engineer at Cinchcast •Previously held position as Lead Software Engineer at The NewsMarket and Synaptic Digital •Systems Architect at Innovative Systems & Solutions •Specializing in web technologies, caching, and scale.
  • 3. What is This Meetup? • New York REDIS NOSQL Meetup • Topics of interest: REDIS, NOSQL, Engineering, Entrepreneurs, Open-Source
  • 4. What Do You Want to Get Out Of It?
  • 5. What is REDIS? • Database? • Caching? • Pub/Sub? • Key/Value Store? • Redis is more like a flexible tool designed to solve specific problems
  • 6. REDIS REmote DIctionary Server  (www.redis.io) Key-Value Store “on steroids” Written by Salvatore Sanfilippo (@antirez) in 2009. Now up to 2.4.13
  • 7. Redis Manifesto – Redis is a DSL (Domain Specific Language) that manipulates abstract data types and implemented as a TCP daemon. Keys are binary-safe strings and values are different kinds of abstract data types. – Redis has persistence option but Memory storage is #1. – The Redis API is a direct consequence of fundamental data structures. – Code is like a poem. – We believe designing systems is a fight against complexity. Most of the time the best way to fight complexity is by not creating it at all. – Redis API has two levels: 1) a subset of the API fits naturally into a distributed version of Redis and 2) a more complex API that supports multi-key operations. – We optimize for joy. When there is no longer joy in writing code, the best thing to do is stop. 7
  • 8. REDIS is Fast • Fast ~100,000 queries per sec. • Compare it with ~30,000 queries per sec for MS SQL Server (if you are lucky) • Kind of like memcached, but values can be persisted and all keys are kept IN MEMORY.
  • 9. Modern Computer Latency L1 3 cycles Non-blocking L2 14 cycles RAM 250 cycles DISK 41,000,000 cycles Blocking NETWO 240,000,000 cycles RK Ryan Dahl, Yahoo BayJax meetup, May 2010
  • 11. Who is using REDIS? 11
  • 12. Data structures Keys are strings which identify pieces of data (values) Values can be strings, integers, hashes, lists, sets, or sorted sets Various atomic operations (push, pop, add, read, set, etc.) – after all REDIS is single- threaded 12
  • 15. Scale Horizontal (multiple processes) Vertical (master-slave) Master-master via zookeeper
  • 16. Master-Master Replication Native Redis Master-Master replication doesn’t exist yet, slated for release end of year Solution using Apache Zookeeper ( http://zookeeper.apache.org/) Checks for status using BLPOP Will promote a slave to master
  • 17. When Not to Use Redis Data is larger than memory Need ACID requirements Big data
  • 18. Security Concerns It is designed to be used only inside trusted environment (kind of like MongoDB) Basic password authentication (but it’s sent in cleartext) No data encryption support 18
  • 19. Security Recommendations Configure firewall to block inbound access on REDIS ports Don’t run REDIS server as root, and harden the server it’s on Don’t store sensitive data in there. 19
  • 20. AOP Caching • Dynamically construct a hash key from argument values. • “Round up” volatile keys such as timestamps • Put into REDIS cache with a configurable TTL • Lookup from cache before SQL server + lazy writes.
  • 21. Real-time Analytics Communicate from hydrating application NodeJS listens to Redis and transmits data to a page using Socket.IO Historical data is stored in Redis Pub/Sub is used to notify listening sockets
  • 23. Cinchcast is Hiring • Well-funded profitable startup Open Positions: used by millions. •Back-end Architect • Patented technology utilized in a new way. •Lead Front-end Engineer • Medical/dental/etc. benefits. • Great office space in mid-town •If you are good we’ll find a role right near subway. • Flexible hours. Top-notch for you : jobs@cinchcast.com compensation + stock options.

Notas del editor

  1. Contents in http://antirez.com/post/redis-manifesto.html Introduction to Redis Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set. In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log. Redis also supports trivial-to-setup master-slave replication, with very fast non-blocking first synchronization, auto-reconnection on net split and so forth. Other features include a simple check-and-set mechanism, pub/sub and configuration settings to make Redis behave like a cache. You can use Redis from most programming languages out there. Redis is written in ANSI C and works in most POSIX systems like Linux, *BSD, OS X and Solaris without external dependencies. There is no official support for Windows builds, although you may have some options.
  2. This perfect example is illustrated by the dialog between Redis (antirez) and memcached (dormando) developers. antirez 1 - On Redis, Memcached, Speed, Benchmarks and The Toilet dormando - Redis VS Memcached (slightly better bench) antirez 2 - An update on the Memcached/Redis benchmark You can see that in the end, the difference between the two solutions is not so staggering, once all technical aspects are considered. Please note both Redis and memcached have been optimized further after these benchmarks ... Finally, when very efficient servers are benchmarked (and stores like Redis or memcached definitely fall in this category), it may be difficult to saturate the server. Sometimes, the performance bottleneck is on client side, and not server-side. In that case, the client (i.e. the benchmark program itself) must be fixed, or perhaps scaled out, in order to reach the maximum throughput.
  3. And many others: Superfeedr Vidiowiki Wish Internet Consulting Ruby Minds Boxcar Zoombu Dark Curse OKNOtizie Moodstocks uses Redis as its main database by means of Ohm . Favstar Heywatch Sharpcloud Wooga for the games "Happy Hospital" and "Monster World" . Sina Weibo Engage PoraOra Leatherbound AuthorityLabs Fotolog TheMatchFixer Check-Host describes their architecture here . ShopSquad localshow.tv PennyAce Nasza Klasa Forrst Surfingbird