Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Redis

You're reading from   Learning Redis Design efficient web and business solutions with Redis

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781783980123
Length 318 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Vinoo Das Vinoo Das
Author Profile Icon Vinoo Das
Vinoo Das
Arrow right icon
View More author details
Toc

Pipelines in Redis


Redis provides a mechanism for faster execution, called pipeline. This groups up all the commands as one command block and sends it to the server for execution. The results of all the commands get queued in a response block and sent back.

Comparing the way pipeline works with multiple individual commands sent across a connection will give us an idea of how pipeline is more efficient and where it needs to be used. Let's assume a scenario where we have to send three commands to Redis. The time taken to send any command to Redis is X seconds, so the same amount of time is required to send the response. The total time spent in going and return journey is 2X seconds. Let's also assume that the time taken for execution is another X seconds. Now in the pipeline commands, since we are sending three commands as one block, the time taken for going to Redis is around X seconds , the time taken for processing all the three commands is 3X seconds, and the time taken for the return journey...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime