-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gnet cannot support large value(>10K) redis benchmark test #290
Comments
how i start gnet: |
I don't think you have a full understanding of |
can i pass the connection reader to the goredis.NewRespReader? |
another question: |
When you find there is an incomplete packet, you should return it without any error, in that case, gnet will buffer these data and continue to read data from socket, if you return gnet.Close like you did in your example, the connection will be closed, so take more time to understand gnet before you develop anything on top of it. |
If you are trying to develop a redis server with gnet, take a reference from https://github.com/IceFireDB/redhub. |
how gnet know it needs to handle a req instead of read it the next time? |
i find that the reference you provided is not used |
If the Decode() returns a nil []byte, gnet will continue to read data from socket. |
gnet.ICode is just a recommended way to do it, you can also put all your code in React(), as long as you ensure you're doing it correctly. |
but since we read the data and reset the buf before, will some data lost? |
will this possible:
will the 1. write A back to socket to make the 2. be a complete request ? |
create other issue about this #297 |
Describe the bug
I try to implement a redis-server by gnet, but I cannot test by redis-benchmark
cmd:
redis-benchmark -h <host> -p<port> -t set,get -n 1000000 -d 1000000 -r 1000000
how I implement it in React:
// async
React:
React(frame []byte, c gnet.Conn) (out []byte, action gnet.Action)
To Reproduce
just run bench
Expected behavior
it can test and show the result
Screenshots
the Screenshot shows only when -d (data size) is small it can run
System Info (please complete the following information):
Additional context
the code is simple, if you need, I can upload later
The text was updated successfully, but these errors were encountered: