Comments (6)
from scale-chat.
https://pkg.go.dev/github.com/gorilla/websocket#hdr-Buffers
from scale-chat.
- Limit the buffer sizes to the maximum expected message size. Buffers larger than the largest message do not provide any benefit.
- compression is experimental
from scale-chat.
from scale-chat.
In my opinion, it would make sense to compare memory usage with and without the buffer. I would guess that it makes sense to create a medium-sized buffer of about 64 or 128 bytes if we want the chat server to be inspired by real chat messages. Most chat messages in my life are rather short, while few may be long texts.
Depending on the distribution of message sizes, setting the buffer size to a value less than the maximum expected message size can greatly reduce memory use with a small impact on performance. Here's an example: If 99% of the messages are smaller than 256 bytes and the maximum message size is 512 bytes, then a buffer size of 256 bytes will result in 1.01 more system calls than a buffer size of 512 bytes. The memory savings is 50%.
-- https://pkg.go.dev/github.com/gorilla/websocket#hdr-Buffers
from scale-chat.
That's right :) Since we want to test with several message sizes, this config might have a direct input on the services performance. In our case all messages will be the same size as well (in the scpe of one load test). I would suggest testing everything with 128 bytes. In the scope of the first load test we could test everything with a different buffersize as well, to "get a feeling" of the parameters impact.
from scale-chat.
Related Issues (20)
- server - Implement global chat
- client - implement client that can chat wia the global chat HOT 1
- Remove dead clients on server HOT 2
- Containerize Server
- Basic Server Monitoring
- Basic web client
- Documentation for v1
- Measure Time of a message roundtrip
- Cannot run cAdvisor (on M1?) HOT 2
- Introduce Workers
- Process CSV files from loadtestclient HOT 1
- Client needs to be shut down when handler quits
- Grafana dashboard panels for cAdvisor
- Limit server resources to simplify load tests
- Perform first load test
- Incompleted CSV write
- Refactor the client management in the server
- Chat Rooms in Server
- Add Server to Server comminication
- Modify prometheus counter values HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scale-chat.