-
Notifications
You must be signed in to change notification settings - Fork 60
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
General questions #1
Comments
That all being said, your approach sounds like the right way to go, although I would do the "connect to a |
Hi @isobit, thank you for your prompt response. I'll be happy to do some stress testing ;-). Below are some Bash scripts I'm using to get Docker to launch 10 instances of the relay server: First, you need to launch NATS using Docker: #!/usr/bin/env bash
docker run -d --rm --name="nats-server" --memory=128M -p 4222:4222 -p 8222:8222 nats #!/usr/bin/env bash
SERVERS=10
NATS_SERVER_IP="0.0.0.0"
RELAY_SERVER_PORT=6001
COUNT=0
while [ $(($COUNT < $SERVERS)) == 1 ];
do
docker run -it --rm --name="nats-relay-$COUNT" --memory=128M -p $RELAY_SERVER_PORT:$RELAY_SERVER_PORT golang sh -c "go get github.com/joshglendenning/ws-tcp-relay && exec ws-tcp-relay -p $RELAY_SERVER_PORT $NATS_SERVER_IP:4222"
echo -e "[$COUNT] - WS-TCP RELAY [$RELAY_SERVER_PORT] STARTED";
COUNT=$(($COUNT + 1))
RELAY_SERVER_PORT=$(($RELAY_SERVER_PORT + 1))
done then you can use I'm in the process of documenting my setup and I will be happy to share it when ready. |
Hey, I'm very interested in stress testing. please share your results |
Here is the Docker image that I'm using for the testing. Unfortunately, I didn't get to do stress testing so far because I only have one application that connects via WebSocket. |
Thank you for the update. I will try to make stress testing and will update. |
I have been testing the combination of
ws-tcp-relay
andwebsocket-nats
using a simple web client.In my particular scenario, I'm using Docker to launch several
ws-tcp-relay
instances and connect them to a single NATS server. Then, I have a webapp that useswebsocket-nats
to connect to aws-tcp-relay
instance randomly and open a websocket session.I have some general questions about
ws-tcp-relay
and I'm wondering if you can share some insight.do you have any info on how many connections a single
ws-tcp-relay
instance can handle?at what point does
ws-tcp-relay
relays the NATS connection?, when a client first connects to the relay? [vianats.connect('ws://localhost:4223')
] or when the client first subscribes to a NATS topic?does
ws-tcp-relay
keeps the relay session to NATS alive? or is this the responsibility of the client usingwebsocket-nats
?I'm interested in evaluating the scalability of
ws-tcp-relay
in combination withwebsocket-nats
and I'm wondering if you might have any suggestions or feedback.Thanks,
A.
The text was updated successfully, but these errors were encountered: