Skip to content

Commit

Permalink
[MM-51909] Add scalability section to docs (#39)
Browse files Browse the repository at this point in the history
* Add scalability section to docs

* Update docs/performance.md

Co-authored-by: Christopher Poile <cpoile@gmail.com>

* Update README.md

Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>

* Update docs/performance.md

Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>

---------

Co-authored-by: Christopher Poile <cpoile@gmail.com>
Co-authored-by: Carrie Warner (Mattermost) <74422101+cwarnermm@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 24, 2023
1 parent b814f1a commit 8acc408
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Documentation and implementation details can be found in the [`docs`](docs/) fol

## Performance

Performance related considerations can be found in the [Performance](docs/performance.md) section.
Performance and scalability-related considerations can be found in the [Performance](docs/performance.md) section.

## Get involved

Expand Down
43 changes: 39 additions & 4 deletions docs/performance.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Performance and scalability considerations
## Performance

### Quality profiles
### Calls Recordings

#### Quality profiles

Recording quality can be configured through the [Calls plugin](https://docs.mattermost.com/configure/plugins-configuration-settings.html#call-recording-quality). At this time we provide the following quality profiles:

Expand All @@ -10,7 +12,7 @@ Recording quality can be configured through the [Calls plugin](https://docs.matt
| Medium | 720p | 20fps | 1.5Mbps (video) / 64Kbps (audio) |
| High | 1080p | 20fps | 2.5Mbps (video) / 64Kbps (audio) |

### Benchmarks
#### Benchmarks

These are the results of a series of benchmarks that were conducted to verify the scalability capabilities of the service. All tests were executed on a AWS EC2 `c6i.2xlarge` instance which is the recommended instance class and size (`8vCPU / 16GB RAM`) for Calls recordings:

Expand All @@ -28,5 +30,38 @@ On the Mattermost side, it may also be necessary to tune the [`FileSettings.MaxF
> If a load-balancer or proxy is in front of Mattermost, extra configuration may be necessary.
> As an example, `nginx` would likely require `client_max_body_size` to be set accordingly.
## Scalability

Starting in version `v0.3.2`, this service includes support for horizontal scalability. This can be achieved by adding an HTTP load balancer in front of multiple `calls-offloader` instances, and configuring the [Job Service URL](https://docs.mattermost.com/configure/plugins-configuration-settings.html#job-service-url) setting accordingly to point to the balancer's host.

#### Example (nginx)

This is an example config for load-balancing the service using [`nginx`](https://www.nginx.com/):

```
upstream backend {
server 10.0.0.1:4545;
server 10.0.0.2:4545;
}
server {
listen 4545 default_server;
listen [::]:4545 default_server;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_buffers 256 16k;
proxy_buffer_size 16k;
proxy_read_timeout 300s;
proxy_pass http://backend;
}
}
```

> **_Note_**
> At this time we don't provide an official solution for horizontal scalability of this service.
> If deploying in a Kubernetes environment, scaling is automatically handled by the default `ClusterIP` service type without needing extra configuration.

0 comments on commit 8acc408

Please sign in to comment.