mirror of https://github.com/mastodon/flodgatt
Update README
This commit is contained in:
parent
bb692430d6
commit
b85271c872
|
@ -1,11 +1,14 @@
|
|||
# Mastodon Streaming Server
|
||||
A WIP blazingly fast drop-in replacement for the Mastodon streaming api server.
|
||||
|
||||
## Current status
|
||||
The streaming server is very much a work in progress. It is currently missing essential features including support for SSL, CORS, and separate development/production environments. However, it has reached the point where it is usable/testable in a localhost development environment and I would greatly appreciate any testing, bug reports, or other feedback you could provide.
|
||||
|
||||
## Installation
|
||||
Installing the WIP version requires the Rust toolchain (the released version will be available as a pre-compiled binary). To install, clone this repository and run `cargo build` (to build the server) `cargo run` (to both build and run the server), or `cargo build --release` (to build the server with release optimizations).
|
||||
|
||||
## Connection to Mastodon
|
||||
The streaming server expects to connect to a running development version of Mastodon. Specifically, it needs to connect to both the Postgres database (to authenticate users) and to the Redis database. You should run Mastodon in whatever way you normally do and configure the streaming server to connect to the appropriate databases.
|
||||
The streaming server expects to connect to a running development version of Mastodon built off of the `master` branch. Specifically, it needs to connect to both the Postgres database (to authenticate users) and to the Redis database. You should run Mastodon in whatever way you normally do and configure the streaming server to connect to the appropriate databases.
|
||||
|
||||
## Configuring
|
||||
You may edit the (currently limited) configuration variables in the `.env` file. Note that, by default, this server is configured to run on port 4000. This allows for easy testing with the development version of Mastodon (which, by default, is configured to communicate with a streaming server running on `localhost:4000`). However, it also conflicts with the current/Node.js version of Mastodon's streaming server, which runs on the same port. Thus, to test this server, you should disable the other streaming server or move it to a non-conflicting port.
|
||||
|
@ -24,3 +27,6 @@ Once the streaming server is running, you can also test it manually. You can te
|
|||
|
||||
## Memory/CPU usage
|
||||
Note that memory usage is higher when running the development version of the streaming server (the one generated with `cargo run` or `cargo build`). If you are interested in measuring RAM or CPU usage, you should likely run `cargo build --release` and test the release version of the executable.
|
||||
|
||||
## Load testing
|
||||
I have not yet found a good way to test the streaming server under load. I have experimented with using `artillery` or other load-testing utilities. However, every utility I am familiar with or have found is built around either HTTP requests or WebSocket connections in which the client sends messages. I have not found a good solution to test receiving SSEs or WebSocket connections where the client does not transmit data after establishing the connection. If you are aware of a good way to do load testing, please let me know.
|
||||
|
|
Loading…
Reference in New Issue