Redis Optimization How-to - Arun Chinnachamy - E-Book

Redis Optimization How-to E-Book

Arun Chinnachamy

0,0
20,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

The database is the backbone of any application and Redis is a next generation NoSQL database which can provide ultra-fast performance if tuned and calibrated correctly. Instant Redis Optimization How-to will show you how to leverage Redis in your application for greater performance and scalability. Instant Redis Optimization How-to will show you how to make the most of Redis. Using real-world examples of Redis as a caching and queuing service, you will learn how to install and calibrate Redis to optimize memory usage, read and write speed, as well as bulk writes and transactions. If you want to use Redis for its blazing fast capabilities, then this book is for you.Instant Redis Optimization How-to shows you how to optimize and scale Redis with practical recipes on installation and calibration for performance and memory optimization as well as advanced features like PUB/SUB.

This book starts by providing clear instructions on how to install and fine-tune Redis to work efficiently in your application stack. You will also learn how to maintain persistence, how to optimize Redis to handle different data types, as well as memory usage optimization. You will then learn how to use bulk writes and transactions, as well as publish/subscribe features to get the most out of Redis.

Offering best practices and troubleshooting tips, this book will also show you how to manage and maintain performance. This book finishes by recommending the best client libraries for all major programming languages. By the end of this book you will know how to create blazing fast applications using Redis.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 76

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Instant Redis Optimization How-to
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Instant Redis Optimization How-to
Choosing your data store (Simple)
Getting ready
Why was Redis created?
Who is using Redis?
How to do it...
There's more...
How does Redis compare with the competition?
Major differences
Comparison with other data stores
Installing Redis (Simple)
Getting ready
How to do it...
How it works...
There's more...
Setting up and testing
Redis in Mac OS X
Redis in Windows
Configuring and tuning Redis (Intermediate)
Getting ready
How to do it...
How it works...
There's more...
Security settings
Advanced configuration
Implementing persistence in Redis (Intermediate)
Getting ready
How to do it...
How it works...
There's more...
Advantages of snapshotting
Limitations of snapshotting
What should we use?
Detecting performance bottlenecks (Intermediate)
Getting ready
How to do it...
How it works...
There's more...
CPU bottleneck
Latency due to the application's design
Performing high-volume writes (Advanced)
How to do it...
How it works...
There's more...
Bulk data import
Redis protocol
How does the pipe mode work?
Leveraging data types (Simple)
How to do it...
There's more...
Strings
Lists
Sets
Hashes
Optimizing memory (Intermediate)
Getting ready
How to do it...
How it works...
CPU/memory tradeoffs
Maximize hash usage
Auto expiry
There's more...
Auto-expiring caching system
Using transactions and Pub/Sub (Advanced)
How to do it…
Transactions
Publish/Subscribe
How it works...
There's more...
A Publish/Subscribe example
Caveats in transaction
Troubleshooting and monitoring (Intermediate)
How to do it...
There's more...
Slow log
Redis software watchdog
Using languages and drivers (Simple)
How to do it...
There's more…
Client Libraries

Instant Redis Optimization How-to

Instant Redis Optimization How-to

Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: May 2013

Production Reference: 1170513

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78216-480-7

www.packtpub.com

Credits

Author

Arun Chinnachamy

Reviewer

Andrea Pavoni

Acquisition Editor

Andrew Duckworth

Commissioning Editor

Ameya Sawant

Technical Editor

Jeeten Handu

Copy Editors

Aditya Nair

Insiya Morviwala

Project Coordinator

Sherin Padayatty

Proofreader

Kevin McGowan

Graphics

Abhinash Sahu

Production Coordinator

Prachali Bhiwandkar

Cover Work

Prachali Bhiwandkar

Cover Image

Conidon Miranda

About the Author

Arun Chinnachamy is a developer and systems architect who focuses on building scalable web applications, with a degree in Chemical Engineering. He is a multifaceted programmer with experience in multiple technologies and programming languages ranging from ADA to C# over the years.

Currently he leads the technology team at MySmartPrice, one of the leading price comparison engines in India.

I would like to express my gratitude to the great minds that created Redis and made this exciting piece of software open source.

This work would not have been possible without the support of my parents and my wife, Suvarchala, who was patient with my round-the-clock working hours.

Thanks to Sitakanta and Sulakshan for introducing me to MySmartPrice and providing me with an opportunity to work there; MySmartPrice started my love affair with Redis.

I would like to thank the open source community for excellent documentation about Redis; it was of incredible help during my early days with Redis.

It is totally unfair to not thank my editor and publisher who believed in me and provided me with this excellent opportunity to share my experience with you.

I would also like to thank each and every one who shaped my career over the years and helped me find the best in me.

About the Reviewer

Andrea Pavoni is a passionate Italian programmer. He's mostly focused on web and mobile development, always looking for the best tools available. Andrea is also an active member of the Italian Ruby community. He helped in the organization for Ruby Day (2011-2012) and coached at the first Italian Rails Girls event in Rome.

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. 

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

The computing world is changing fast. In this fast-moving world, the only way to survive is to deliver data quickly. We are moving towards a world in which even a second counts and can affect user behavior drastically. That is why the whole NoSQL movement started. NoSQL data stores were able to provide faster access by sacrificing some of the advantages that traditional databases offer. Redis is one of the fastest data stores in the market and is being used by many giants in the web industry.

It is important for software professionals to keep up-to-date with the latest technology offerings and tools in the market, which is critical to gain advantage in business. The main goal of this book is to introduce you to Redis. The book helps you to understand the various configurations and options available in Redis, which could ease your efforts of adding Redis to your application stack.

What this book covers

Choosing your data store (Simple) shows what data store to select from top names like Cassandra, MongoDB, Riak, CouchBase, MemCached, and others, based on your application requirements.

Installing Redis (Simple) focuses on a step-by-step installation procedure of Redis in Linux systems, with commands to test the installation.

Configuring and tuning Redis (Intermediate) helps you understand all configurations available in Redis and how to effectively configure the server to make the most out of it.

Implementing persistence in Redis (Intermediate) defines all the options available in Redis to enable data persistence. You can choose the options based on the data durability you prefer.

Detecting performance bottlenecks (Intermediate) helps you understand the various bottlenecks in Redis and how effectively you can mitigate them to make the most out of your installation.

Performing high-volume writes (Advanced) tells you about high-volume writes into Redis. It helps you to load a large amount of data in very little time, either through pipelining or using the Redis protocol.

Leveraging data types (Simple) helps you understand the most important feature in Redis—data types. This recipe helps you understand the data types and how to use them to create even more complex data types.

Optimizing memory (Intermediate) helps you reach the goal of optimizing the memory usage of this in-memory data store. It explains presharding and how to use the auto-expiry feature in Redis with a real-life example.

Using transactions and Pub/Sub (Advanced) covers one of the advanced features in Redis, which makes it an ideal broadcast for servers. This also helps you understand transactions and how to use Publish/Subscribe in Redis with a real-life example of a messaging system.

Troubleshooting and monitoring (Intermediate) tells you about debugging and monitoring the installation using the Slow log or monitor command in Redis. This recipe also explains how to use the Redis watchdog to diagnose software bugs.

Using languages and drivers (Simple) helps you choose a driver library to communicate with Redis using your favorite language.

What you need for this book