Report this

What is the reason for this report?

How to connect redis without NewClient or NewClusterClient in Go?

Posted on April 13, 2021

I wanted to connect redis without client/server architecture. Is there any alternative way to connect redis without NewClient or NewClusterClient in Go? As I wanted to run ycsb on go without client/server architecture.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

Generally, Redis requires a client/server architecture, it’s the way Redis is designed to work. However, if you are looking for a different approach to connect to Redis in Go, you may consider a package like go-redis which is a robust, full-featured Redis client for Golang.

Regarding YCSB, it’s a benchmarking tool and is expected to operate with client/server communication. If for some reason you’re attempting to circumvent this, I’d recommend rethinking your use case because trying to utilize something like Redis or YCSB without the intended client/server model could lead to unexpected issues.

For more details, please refer to the DigitalOcean tutorial on How To Install and Secure Redis on Ubuntu 22.04.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.