Questions tagged [redigo]

Redigo is a Go client for the Redis database

Redigo is a Go client for the Redis database.

Features:

  • A Print-like API with support for all Redis commands.
  • Pipelining, including pipelined transactions.
  • Publish/Subscribe.
  • Connection pooling.
  • Script helper type with optimistic use of EVALSHA.
  • Helper functions for working with command replies.

Github: https://github.com/garyburd/redigo

API Reference: https://godoc.org/github.com/garyburd/redigo/redis

76 questions
2
votes
0 answers

Increased tail latencies seen with redigo client library

Our service uses redigo as redis client library. Our application sees an rps of 4k. So for p99 requests the latencies are under the sla but for tail latencies we saw redis Get calls were taking more that 1 second. We checked server for slow…
2
votes
2 answers

How to provide a password to the redigo client in redisearch-go (Golang)

I'm trying to use Go to connect to my RediSearch (Redis module) instance. Combing through the documentation and Go code that generates the client, I don't see how to pass authentication options to the Redigo client within... Is this an oversight on…
Devin Burke
  • 13,642
  • 12
  • 55
  • 82
2
votes
1 answer

dial tcp remote_ip:6379: connect: connection timed out

I'm using redigo for both regular commands as well as subscribing. Every few days I get this error which causes a panic. dial tcp IP:6379: connect: connection timed out I'm guessing there is a some lag or minor disturbance with the network which is…
Rob Fox
  • 5,355
  • 7
  • 37
  • 63
2
votes
2 answers

gomodule/redigo how can I push multiple keys to redis

I am trying to rpush multiple elements to a redis key. Currently using a redis pool connection using https://github.com/gomodule/redigo. If I try to put an array into rpush , a string with the array concatenated is pushed. How can I push individual…
Ram
  • 1,155
  • 13
  • 34
2
votes
1 answer

Cannot convert string map to json

I'd like to make a json out of a hash received from redis using redigo: func showHashtags(c *gin.Context) { hashMap, err := redis.StringMap(conn.Do("HGETALL", MyDict)) if err != nil { fmt.Println(err) } …
Karlom
  • 13,323
  • 27
  • 72
  • 116
2
votes
1 answer

GEOADD command with Redigo

Here's what i'm trying, using Redigo ("github.com/garyburd/redigo/redis") : insertPos := []string{"3.361389", "38.115556", "12"} if _, err := conn.Do("GEOADD", redis.Args{}.Add("geoIndex").AddFlat(&insertPos)...); err != nil { log.Print(err) }…
Err0r500
  • 25
  • 3
2
votes
3 answers

Calling lua script from redigo throwing error wrong number of args

I am trying to use redigo to execute a lua script on redis. My code looks like below:- package main import ( "github.com/PuerkitoBio/redisc" "github.com/garyburd/redigo/redis" "log" "time" ) const script = `if redis.call("EXISTS",…
tuk
  • 5,941
  • 14
  • 79
  • 162
2
votes
1 answer

golang webservice crashes unexpectedly without error

I'm developping a webservice with golang. It uses the net/http package and others packages like github.com/go-sql-driver/mysql and redigo (redis). I have no problem when I develop it, no bugs. When I put it on a server in production as a service in…
GuillaumeP
  • 504
  • 5
  • 19
2
votes
1 answer

Getting response line error - Redigo Redis Client

I'm creating strings out of JSON serialized structs and running a PUBLISH command on a redis connection this this. _, err := r.Do("PUBLISH", key, ncs) This go service is used in to process/repurpose all of the messages that get sent on our chat…
Jorge Olivero
  • 3,705
  • 9
  • 27
  • 33
1
vote
2 answers

How to change redis passwd without downtime

for the safety concern, we plan to change our redis passwd periodically(like every 4weeks). The question is how to change it without external downtime or just a very short period of time. My plans are: clear the passwd on redis server and…
caibirdme
  • 371
  • 1
  • 3
  • 15
1
vote
0 answers

Golang Redis PubSub sends duplicate messages

I am trying to build a feature with the redis pub/sub implementation on golang but for every client connected to the server (WebSocket) the number of messages published doubles. func (c client) Subscribe() { con := initRedis() defer…
elvis-chuks
  • 86
  • 2
  • 6
1
vote
0 answers

Rotate password in redigo client redis pool library

My application is using redigo client library to establish TCP connection with redis server. I want to change the password of the redis at run-time and want the redigo library to use the new password in subsequent connections. ( in redis pool ) I…
1
vote
1 answer

Reading Redis key-value which is JSON string using redigo

I am trying to read Redis Key-val in Go. Key is string and value is JSON string. Eg- Key= discov_32161296 and Value as Json string=…
Abhay Kumar
  • 403
  • 1
  • 5
  • 12
1
vote
0 answers

Redigo fetches old value from Redis Docker container

I'm developing a golang web project with Redigo to connect to a redis docker container. While the golang web application is in running state, I've changed the value of a redis key using SET MyFlag true in redis-cli. But this is not reflecting in my…
Ramanujan R
  • 1,601
  • 2
  • 23
  • 43
1
vote
2 answers

golang + redis concurrency scheduler performance issue

I write a simple concurrency scheduler, but it seems to have a performance issue at a high level concurrency. Here is the code (scheduler + concurrent rate limiter test): package main import ( "flag" "fmt" "log" "os" "runtime" …
seaguest
  • 2,510
  • 5
  • 27
  • 45