Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Redis

You're reading from  Learning Redis

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781783980123
Pages 318 pages
Edition 1st Edition
Languages
Author (1):
Vinoo Das Vinoo Das
Profile icon Vinoo Das
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 $15.99/month. Cancel anytime