anycable 0.6.1 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +49 -2
- data/bin/anycable +1 -1
- data/bin/anycabled +30 -0
- data/lib/anycable/broadcast_adapters/redis.rb +1 -1
- data/lib/anycable/cli.rb +1 -1
- data/lib/anycable/config.rb +4 -2
- data/lib/anycable/exceptions_handling.rb +9 -3
- data/lib/anycable/rpc_handler.rb +27 -4
- data/lib/anycable/server.rb +22 -6
- data/lib/anycable/version.rb +1 -1
- metadata +7 -56
- data/.github/ISSUE_TEMPLATE.md +0 -25
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -31
- data/.gitignore +0 -40
- data/.hound.yml +0 -3
- data/.rubocop.yml +0 -71
- data/.travis.yml +0 -16
- data/Gemfile +0 -8
- data/Makefile +0 -5
- data/PITCHME.md +0 -139
- data/PITCHME.yaml +0 -1
- data/Rakefile +0 -8
- data/anycable.gemspec +0 -35
- data/assets/Memory3.png +0 -0
- data/assets/Memory5.png +0 -0
- data/assets/RTT3.png +0 -0
- data/assets/RTT5.png +0 -0
- data/assets/Scheme1.png +0 -0
- data/assets/Scheme2.png +0 -0
- data/assets/cpu_chart.gif +0 -0
- data/assets/cpu_chart2.gif +0 -0
- data/assets/evlms.png +0 -0
- data/benchmarks/.gitignore +0 -2
- data/benchmarks/2017-02-12.md +0 -308
- data/benchmarks/2018-03-04.md +0 -192
- data/benchmarks/2018-05-27-rpc-bench.md +0 -57
- data/benchmarks/2018-10-27.md +0 -181
- data/benchmarks/HowTo.md +0 -23
- data/benchmarks/ansible.cfg +0 -9
- data/benchmarks/assets/2018-10-27-action-cable-rss.png +0 -0
- data/benchmarks/assets/2018-10-27-action-cable-rtt.png +0 -0
- data/benchmarks/assets/2018-10-27-anycable-rss.png +0 -0
- data/benchmarks/assets/2018-10-27-anycable-rtt.png +0 -0
- data/benchmarks/assets/2018-10-27-async-rss.png +0 -0
- data/benchmarks/assets/2018-10-27-async-rtt.png +0 -0
- data/benchmarks/assets/2018-10-27-falcon-cable-rss.png +0 -0
- data/benchmarks/assets/2018-10-27-falcon-cable-rtt.png +0 -0
- data/benchmarks/assets/2018-10-27-iodine-cable-rss.png +0 -0
- data/benchmarks/assets/2018-10-27-iodine-cable-rtt.png +0 -0
- data/benchmarks/assets/2018-10-27-plezi-rss.png +0 -0
- data/benchmarks/assets/2018-10-27-plezi-rtt.png +0 -0
- data/benchmarks/bench.png +0 -0
- data/benchmarks/benchmark.yml +0 -69
- data/benchmarks/hosts +0 -5
- data/benchmarks/rtt_plot.py +0 -74
- data/benchmarks/rtt_plot_test.py +0 -16
- data/benchmarks/servers.yml +0 -58
- data/circle.yml +0 -8
- data/etc/bug_report_template.rb +0 -76
- data/lib/anycable/handler/capture_exceptions.rb +0 -39
- data/protos/rpc.proto +0 -55
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
First of all, thanks for your report/suggestion/whatever!
|
3
|
-
|
4
|
-
This template is for bug reports. If you are reporting a bug, please continue on. If you are here for another reason,
|
5
|
-
feel free to skip the rest of this template.
|
6
|
-
-->
|
7
|
-
|
8
|
-
### Tell us about your environment
|
9
|
-
|
10
|
-
**Ruby version:**
|
11
|
-
|
12
|
-
**`anycable` gem version:**
|
13
|
-
|
14
|
-
**`grpc` gem version:**
|
15
|
-
|
16
|
-
### What did you do?
|
17
|
-
|
18
|
-
### What did you expect to happen?
|
19
|
-
|
20
|
-
### What actually happened?
|
21
|
-
|
22
|
-
<!--
|
23
|
-
Please, provide reproduction script (using this template (https://github.com/anycable/anycable/blob/master/etc/bug_report_template.rb)
|
24
|
-
when submitting bugs if possible.
|
25
|
-
-->
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
First of all, thanks for contributing!
|
3
|
-
|
4
|
-
If it's a typo fix or minor documentation update feel free to skip the rest of this template!
|
5
|
-
-->
|
6
|
-
|
7
|
-
<!--
|
8
|
-
If it's a bug fix, then link it to the issue, for example:
|
9
|
-
|
10
|
-
Fixes #xxx
|
11
|
-
-->
|
12
|
-
|
13
|
-
|
14
|
-
<!--
|
15
|
-
Otherwise, describe the changes:
|
16
|
-
|
17
|
-
### What is the purpose of this pull request?
|
18
|
-
|
19
|
-
### What changes did you make? (overview)
|
20
|
-
|
21
|
-
### Is there anything you'd like reviewers to focus on?
|
22
|
-
|
23
|
-
-->
|
24
|
-
|
25
|
-
<!--
|
26
|
-
Please ensure your PR is ready:
|
27
|
-
|
28
|
-
- Include tests for this change
|
29
|
-
- Add Changelog entry
|
30
|
-
- Update documentation for this change (if appropriate)
|
31
|
-
-->
|
data/.gitignore
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# Numerous always-ignore extensions
|
2
|
-
*.diff
|
3
|
-
*.err
|
4
|
-
*.orig
|
5
|
-
*.log
|
6
|
-
*.rej
|
7
|
-
*.swo
|
8
|
-
*.swp
|
9
|
-
*.vi
|
10
|
-
*~
|
11
|
-
*.sass-cache
|
12
|
-
*.iml
|
13
|
-
.idea/
|
14
|
-
|
15
|
-
# Sublime
|
16
|
-
*.sublime-project
|
17
|
-
*.sublime-workspace
|
18
|
-
|
19
|
-
# OS or Editor folders
|
20
|
-
.DS_Store
|
21
|
-
.cache
|
22
|
-
.project
|
23
|
-
.settings
|
24
|
-
.tmproj
|
25
|
-
Thumbs.db
|
26
|
-
|
27
|
-
.bundle/
|
28
|
-
log/*.log
|
29
|
-
*.gz
|
30
|
-
pkg/
|
31
|
-
spec/dummy/db/*.sqlite3
|
32
|
-
spec/dummy/db/*.sqlite3-journal
|
33
|
-
spec/dummy/tmp/
|
34
|
-
|
35
|
-
Gemfile.lock
|
36
|
-
Gemfile.local
|
37
|
-
.rspec
|
38
|
-
*.gem
|
39
|
-
tmp/
|
40
|
-
coverage/
|
data/.hound.yml
DELETED
data/.rubocop.yml
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
# Include gemspec and Rakefile
|
3
|
-
Include:
|
4
|
-
- 'lib/**/*.rb'
|
5
|
-
- 'lib/**/*.rake'
|
6
|
-
- 'spec/**/*.rb'
|
7
|
-
Exclude:
|
8
|
-
- 'bin/**/*'
|
9
|
-
- 'tmp/**/*'
|
10
|
-
- 'lib/anycable/rpc/**/*'
|
11
|
-
- 'vendor/**/*'
|
12
|
-
- 'gemfiles/**/*'
|
13
|
-
- 'Gemfile'
|
14
|
-
- 'Rakefile'
|
15
|
-
- '*.gemspec'
|
16
|
-
DisplayCopNames: true
|
17
|
-
StyleGuideCopsOnly: false
|
18
|
-
TargetRubyVersion: 2.4
|
19
|
-
|
20
|
-
Rails:
|
21
|
-
Enabled: false
|
22
|
-
|
23
|
-
Style/Documentation:
|
24
|
-
Exclude:
|
25
|
-
- 'spec/**/*.rb'
|
26
|
-
|
27
|
-
Style/StringLiterals:
|
28
|
-
EnforcedStyle: double_quotes
|
29
|
-
|
30
|
-
Layout/SpaceInsideStringInterpolation:
|
31
|
-
EnforcedStyle: no_space
|
32
|
-
|
33
|
-
Style/BlockDelimiters:
|
34
|
-
Exclude:
|
35
|
-
- 'spec/**/*.rb'
|
36
|
-
|
37
|
-
Style/ClassAndModuleChildren:
|
38
|
-
Exclude:
|
39
|
-
- 'spec/**/*.rb'
|
40
|
-
|
41
|
-
Style/ParallelAssignment:
|
42
|
-
Exclude:
|
43
|
-
- 'spec/**/*.rb'
|
44
|
-
|
45
|
-
Metrics/MethodLength:
|
46
|
-
Exclude:
|
47
|
-
- 'spec/**/*.rb'
|
48
|
-
|
49
|
-
Metrics/LineLength:
|
50
|
-
Max: 100
|
51
|
-
Exclude:
|
52
|
-
- 'spec/**/*.rb'
|
53
|
-
|
54
|
-
Metrics/AbcSize:
|
55
|
-
Exclude:
|
56
|
-
- 'spec/**/*.rb'
|
57
|
-
|
58
|
-
Metrics/BlockLength:
|
59
|
-
Exclude:
|
60
|
-
- 'spec/**/*.rb'
|
61
|
-
|
62
|
-
Metrics/CyclomaticComplexity:
|
63
|
-
Exclude:
|
64
|
-
- 'spec/**/*.rb'
|
65
|
-
|
66
|
-
Metrics/PerceivedComplexity:
|
67
|
-
Exclude:
|
68
|
-
- 'spec/**/*.rb'
|
69
|
-
|
70
|
-
Lint/HandleExceptions:
|
71
|
-
Enabled: false
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Makefile
DELETED
data/PITCHME.md
DELETED
@@ -1,139 +0,0 @@
|
|
1
|
-
#HSLIDE
|
2
|
-
|
3
|
-
## AnyCable
|
4
|
-
### A polyglot replacement for <span style="color:#e49436">ActionCable</span> server
|
5
|
-
|
6
|
-
#HSLIDE
|
7
|
-
|
8
|
-
## ActionCable
|
9
|
-
|
10
|
-
#### Easy to use <!-- .element: class="fragment" -->
|
11
|
-
|
12
|
-
#### Allows you to access business logic <!-- .element: class="fragment" -->
|
13
|
-
|
14
|
-
#### Has JS client that just works <!-- .element: class="fragment" -->
|
15
|
-
|
16
|
-
#HSLIDE
|
17
|
-
|
18
|
-
## ActionCable
|
19
|
-
|
20
|
-
### is good for [designing live features](http://weblog.rubyonrails.org/2016/6/30/Rails-5-0-final/)
|
21
|
-
|
22
|
-
|
23
|
-
#HSLIDE
|
24
|
-
|
25
|
-
## But...
|
26
|
-
### is it ready for <span style="color:#e49436">production</span>?
|
27
|
-
|
28
|
-
#HSLIDE
|
29
|
-
|
30
|
-
## Benchmarks
|
31
|
-
|
32
|
-
#### Unfortunately, <span style="color:#e49436">ActionCable</span> leaves much to be desired
|
33
|
-
|
34
|
-
<span style="font-size:0.6em; color:gray">Press Down key to see charts and gifs</span>
|
35
|
-
|
36
|
-
#VSLIDE
|
37
|
-
|
38
|
-
## Memory
|
39
|
-
|
40
|
-
![memory](assets/Memory3.png)
|
41
|
-
|
42
|
-
#VSLIDE
|
43
|
-
|
44
|
-
## CPU
|
45
|
-
|
46
|
-
![cpu](assets/cpu_chart.gif)
|
47
|
-
|
48
|
-
#VSLIDE
|
49
|
-
|
50
|
-
## Broadcast Round Trip Time
|
51
|
-
|
52
|
-
![rtt](assets/RTT3.png)
|
53
|
-
|
54
|
-
#HSLIDE
|
55
|
-
|
56
|
-
### Let's extract <span style="color:#e49436">WebSockets</span> somewhere else!
|
57
|
-
|
58
|
-
#HSLIDE
|
59
|
-
|
60
|
-
## AnyCable
|
61
|
-
|
62
|
-
#### Combines the good parts from <span style="color:#e49436">ActionCable</span> with the power of your favorite language for concurrent applications
|
63
|
-
|
64
|
-
<span style="font-size:0.6em; color:gray">How it works? See below</span>
|
65
|
-
|
66
|
-
#VSLIDE
|
67
|
-
|
68
|
-
## How AnyCable Works
|
69
|
-
|
70
|
-
![diagram](assets/Scheme2.png)
|
71
|
-
|
72
|
-
#VSLIDE
|
73
|
-
|
74
|
-
## [gRPC](http://grpc.io)
|
75
|
-
|
76
|
-
### Makes AnyCable to be a <span style="color:#e49436">polyglot</span>
|
77
|
-
|
78
|
-
#VSLIDE
|
79
|
-
|
80
|
-
## AnyCable
|
81
|
-
|
82
|
-
#### [Compatible](https://github.com/anycable/anycable#actioncable-compatibility) with ActionCable (channels, javascript, broadcasting)
|
83
|
-
|
84
|
-
#### You can still use ActionCable for <span style="color:#e49436">development</span> and <span style="color:#e49436">testing</span>
|
85
|
-
|
86
|
-
#VSLIDE
|
87
|
-
|
88
|
-
## AnyCable Servers
|
89
|
-
|
90
|
-
- [anycable-go](https://github.com/anycable/anycable-go)
|
91
|
-
|
92
|
-
- [erlycable](https://github.com/anycable/erlycable)
|
93
|
-
|
94
|
-
#VSLIDE
|
95
|
-
|
96
|
-
## AnyCable
|
97
|
-
|
98
|
-
### [Demo Application](https://github.com/anycable/anycable_demo)
|
99
|
-
|
100
|
-
#HSLIDE
|
101
|
-
|
102
|
-
## Benchmarks Again
|
103
|
-
|
104
|
-
#### AnyCable shows much more better performance.
|
105
|
-
|
106
|
-
<span style="font-size:0.6em; color:gray">Press Down key to see charts and gifs</span>
|
107
|
-
|
108
|
-
#VSLIDE
|
109
|
-
|
110
|
-
## Memory
|
111
|
-
|
112
|
-
![memory](assets/Memory5.png)
|
113
|
-
|
114
|
-
#VSLIDE
|
115
|
-
|
116
|
-
## CPU
|
117
|
-
|
118
|
-
![cpu](assets/cpu_chart2.gif)
|
119
|
-
|
120
|
-
#VSLIDE
|
121
|
-
|
122
|
-
## Broadcast Round Trip Time
|
123
|
-
|
124
|
-
![rtt](assets/RTT5.png)
|
125
|
-
|
126
|
-
|
127
|
-
#HSLIDE
|
128
|
-
|
129
|
-
## Let's Make ActionCable Not Suck!
|
130
|
-
|
131
|
-
[anycable.evilmartians.io](http://anycable.io/)
|
132
|
-
|
133
|
-
Vladimir Dementyev [@palkan_tula](http://twitter.com/palkan_tula)
|
134
|
-
|
135
|
-
[Evil Martians](http://evilmartians.com)
|
136
|
-
|
137
|
-
Twitter [@any_cable](http://twitter.com/any_cable)
|
138
|
-
|
139
|
-
GitHub [@anycable](http://github.com/anycable)
|
data/PITCHME.yaml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
theme : moon
|
data/Rakefile
DELETED
data/anycable.gemspec
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'anycable/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = "anycable"
|
9
|
-
spec.version = AnyCable::VERSION
|
10
|
-
spec.authors = ["palkan"]
|
11
|
-
spec.email = ["dementiev.vm@gmail.com"]
|
12
|
-
|
13
|
-
spec.summary = "AnyCable is a polyglot replacement for ActionCable-compatible servers"
|
14
|
-
spec.description = "AnyCable is a polyglot replacement for ActionCable-compatible servers"
|
15
|
-
spec.homepage = "http://github.com/anycable/anycable"
|
16
|
-
spec.license = "MIT"
|
17
|
-
|
18
|
-
spec.executables = ["anycable"]
|
19
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.required_ruby_version = '>= 2.4.0'
|
23
|
-
|
24
|
-
spec.add_dependency "anyway_config", "~> 1.4.2"
|
25
|
-
spec.add_dependency "grpc", "~> 1.17"
|
26
|
-
|
27
|
-
spec.add_development_dependency "redis", ">= 4.0"
|
28
|
-
spec.add_development_dependency "bundler", ">= 1"
|
29
|
-
spec.add_development_dependency "rake", ">= 10.0"
|
30
|
-
spec.add_development_dependency "rack", "~> 2.0"
|
31
|
-
spec.add_development_dependency "rspec", ">= 3.5"
|
32
|
-
spec.add_development_dependency "rubocop", "~> 0.60.0"
|
33
|
-
spec.add_development_dependency "simplecov", ">= 0.3.8"
|
34
|
-
spec.add_development_dependency "pry-byebug"
|
35
|
-
end
|
data/assets/Memory3.png
DELETED
Binary file
|
data/assets/Memory5.png
DELETED
Binary file
|
data/assets/RTT3.png
DELETED
Binary file
|
data/assets/RTT5.png
DELETED
Binary file
|
data/assets/Scheme1.png
DELETED
Binary file
|
data/assets/Scheme2.png
DELETED
Binary file
|
data/assets/cpu_chart.gif
DELETED
Binary file
|
data/assets/cpu_chart2.gif
DELETED
Binary file
|
data/assets/evlms.png
DELETED
Binary file
|
data/benchmarks/.gitignore
DELETED
data/benchmarks/2017-02-12.md
DELETED
@@ -1,308 +0,0 @@
|
|
1
|
-
# WebSocket Shootout Benchmark (2017-02-12)
|
2
|
-
|
3
|
-
Code: https://github.com/palkan/websocket-shootout
|
4
|
-
Client/Server instances: c3.4xlarge (16 vCPU, 30 GiB RAM).
|
5
|
-
|
6
|
-
Ruby: 2.3.4
|
7
|
-
Rails: 5.1.0
|
8
|
-
|
9
|
-
The benchmark measures broadcasting RTT for 10k clients.
|
10
|
-
|
11
|
-
**NOTE**: memory and CPU usage was measured by looking at `htop` output.
|
12
|
-
|
13
|
-
## Action Cable (8 workers)
|
14
|
-
|
15
|
-
```
|
16
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/cable --server-type=actioncable
|
17
|
-
|
18
|
-
clients: 1000 95per-rtt: 700ms min-rtt: 2ms median-rtt: 264ms max-rtt: 854ms
|
19
|
-
clients: 2000 95per-rtt: 1155ms min-rtt: 1ms median-rtt: 490ms max-rtt: 1358ms
|
20
|
-
clients: 3000 95per-rtt: 1584ms min-rtt: 1ms median-rtt: 769ms max-rtt: 1644ms
|
21
|
-
clients: 4000 95per-rtt: 1787ms min-rtt: 1ms median-rtt: 1089ms max-rtt: 2053ms
|
22
|
-
clients: 5000 95per-rtt: 2258ms min-rtt: 2ms median-rtt: 1387ms max-rtt: 2594ms
|
23
|
-
clients: 6000 95per-rtt: 3068ms min-rtt: 2ms median-rtt: 1733ms max-rtt: 3190ms
|
24
|
-
clients: 7000 95per-rtt: 3907ms min-rtt: 1ms median-rtt: 1734ms max-rtt: 4332ms
|
25
|
-
clients: 8000 95per-rtt: 4479ms min-rtt: 1ms median-rtt: 2137ms max-rtt: 5469ms
|
26
|
-
clients: 9000 95per-rtt: 5734ms min-rtt: 1ms median-rtt: 2356ms max-rtt: 8234ms
|
27
|
-
clients: 10000 95per-rtt: 5292ms min-rtt: 1ms median-rtt: 2784ms max-rtt: 6454ms
|
28
|
-
|
29
|
-
Missing received broadcasts: expected 6600000, got 6572168
|
30
|
-
```
|
31
|
-
|
32
|
-
CPU: ~70%
|
33
|
-
|
34
|
-
MEM: ~ 4 GiB
|
35
|
-
|
36
|
-
## Action Cable (16 workers)
|
37
|
-
|
38
|
-
```
|
39
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/cable --server-type=actioncable
|
40
|
-
|
41
|
-
clients: 1000 95per-rtt: 575ms min-rtt: 1ms median-rtt: 115ms max-rtt: 846ms
|
42
|
-
clients: 2000 95per-rtt: 1144ms min-rtt: 1ms median-rtt: 250ms max-rtt: 1457ms
|
43
|
-
clients: 3000 95per-rtt: 1274ms min-rtt: 1ms median-rtt: 439ms max-rtt: 1673ms
|
44
|
-
clients: 4000 95per-rtt: 1768ms min-rtt: 21ms median-rtt: 626ms max-rtt: 2083ms
|
45
|
-
clients: 5000 95per-rtt: 1462ms min-rtt: 1ms median-rtt: 892ms max-rtt: 1767ms
|
46
|
-
clients: 6000 95per-rtt: 2579ms min-rtt: 1ms median-rtt: 834ms max-rtt: 2771ms
|
47
|
-
clients: 7000 95per-rtt: 3033ms min-rtt: 1ms median-rtt: 1008ms max-rtt: 3325ms
|
48
|
-
clients: 8000 95per-rtt: 3275ms min-rtt: 1ms median-rtt: 1160ms max-rtt: 4268ms
|
49
|
-
clients: 9000 95per-rtt: 4406ms min-rtt: 1ms median-rtt: 1342ms max-rtt: 5018ms
|
50
|
-
clients: 10000 95per-rtt: 5414ms min-rtt: 1ms median-rtt: 1504ms max-rtt: 7039ms
|
51
|
-
|
52
|
-
Missing received broadcasts: expected 6600000, got 6589644
|
53
|
-
```
|
54
|
-
|
55
|
-
CPU: ~80-100%
|
56
|
-
|
57
|
-
MEM: ~ 5 GiB
|
58
|
-
|
59
|
-
## ActionCable / Patched (8 workers)
|
60
|
-
|
61
|
-
About patch: https://github.com/rails/rails/issues/26999
|
62
|
-
|
63
|
-
```
|
64
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/cable --server-type=actioncable
|
65
|
-
|
66
|
-
clients: 1000 95per-rtt: 161ms min-rtt: 1ms median-rtt: 44ms max-rtt: 236ms
|
67
|
-
clients: 2000 95per-rtt: 292ms min-rtt: 1ms median-rtt: 43ms max-rtt: 389ms
|
68
|
-
clients: 3000 95per-rtt: 359ms min-rtt: 1ms median-rtt: 96ms max-rtt: 556ms
|
69
|
-
clients: 4000 95per-rtt: 467ms min-rtt: 1ms median-rtt: 97ms max-rtt: 657ms
|
70
|
-
clients: 5000 95per-rtt: 699ms min-rtt: 1ms median-rtt: 101ms max-rtt: 854ms
|
71
|
-
clients: 6000 95per-rtt: 556ms min-rtt: 1ms median-rtt: 77ms max-rtt: 713ms
|
72
|
-
clients: 7000 95per-rtt: 717ms min-rtt: 1ms median-rtt: 95ms max-rtt: 1145ms
|
73
|
-
clients: 8000 95per-rtt: 679ms min-rtt: 1ms median-rtt: 19ms max-rtt: 1089ms
|
74
|
-
clients: 9000 95per-rtt: 561ms min-rtt: 1ms median-rtt: 25ms max-rtt: 938ms
|
75
|
-
clients: 10000 95per-rtt: 1038ms min-rtt: 1ms median-rtt: 59ms max-rtt: 2197ms
|
76
|
-
|
77
|
-
Missing received broadcasts: expected 6600000, got 5649743
|
78
|
-
```
|
79
|
-
|
80
|
-
CPU: ~70%
|
81
|
-
|
82
|
-
MEM: ~ 4 GiB
|
83
|
-
|
84
|
-
## ActionCable / Patched (16 workers)
|
85
|
-
|
86
|
-
```
|
87
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/cable --server-type=actioncable
|
88
|
-
|
89
|
-
clients: 1000 95per-rtt: 228ms min-rtt: 1ms median-rtt: 53ms max-rtt: 425ms
|
90
|
-
clients: 2000 95per-rtt: 277ms min-rtt: 1ms median-rtt: 63ms max-rtt: 407ms
|
91
|
-
clients: 3000 95per-rtt: 349ms min-rtt: 1ms median-rtt: 28ms max-rtt: 640ms
|
92
|
-
clients: 4000 95per-rtt: 459ms min-rtt: 1ms median-rtt: 56ms max-rtt: 699ms
|
93
|
-
clients: 5000 95per-rtt: 485ms min-rtt: 1ms median-rtt: 52ms max-rtt: 588ms
|
94
|
-
clients: 6000 95per-rtt: 493ms min-rtt: 1ms median-rtt: 86ms max-rtt: 572ms
|
95
|
-
clients: 7000 95per-rtt: 466ms min-rtt: 1ms median-rtt: 90ms max-rtt: 739ms
|
96
|
-
clients: 8000 95per-rtt: 530ms min-rtt: 1ms median-rtt: 26ms max-rtt: 1225ms
|
97
|
-
clients: 9000 95per-rtt: 459ms min-rtt: 1ms median-rtt: 39ms max-rtt: 622ms
|
98
|
-
clients: 10000 95per-rtt: 477ms min-rtt: 1ms median-rtt: 71ms max-rtt: 632ms
|
99
|
-
|
100
|
-
Missing received broadcasts: expected 6600000, got 5662008
|
101
|
-
```
|
102
|
-
|
103
|
-
CPU: ~80-100%
|
104
|
-
|
105
|
-
MEM: ~ 5 GiB
|
106
|
-
|
107
|
-
## Action Cable / AnyCable-Go
|
108
|
-
|
109
|
-
```
|
110
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/cable --server-type=actioncable
|
111
|
-
|
112
|
-
clients: 1000 95per-rtt: 172ms min-rtt: 2ms median-rtt: 9ms max-rtt: 220ms
|
113
|
-
clients: 2000 95per-rtt: 228ms min-rtt: 2ms median-rtt: 16ms max-rtt: 498ms
|
114
|
-
clients: 3000 95per-rtt: 367ms min-rtt: 2ms median-rtt: 14ms max-rtt: 798ms
|
115
|
-
clients: 4000 95per-rtt: 426ms min-rtt: 2ms median-rtt: 24ms max-rtt: 965ms
|
116
|
-
clients: 5000 95per-rtt: 652ms min-rtt: 2ms median-rtt: 30ms max-rtt: 1062ms
|
117
|
-
clients: 6000 95per-rtt: 580ms min-rtt: 2ms median-rtt: 44ms max-rtt: 1306ms
|
118
|
-
clients: 7000 95per-rtt: 813ms min-rtt: 2ms median-rtt: 40ms max-rtt: 2270ms
|
119
|
-
clients: 8000 95per-rtt: 657ms min-rtt: 2ms median-rtt: 39ms max-rtt: 2457ms
|
120
|
-
clients: 9000 95per-rtt: 792ms min-rtt: 2ms median-rtt: 117ms max-rtt: 1557ms
|
121
|
-
clients: 10000 95per-rtt: 727ms min-rtt: 2ms median-rtt: 66ms max-rtt: 3391ms
|
122
|
-
|
123
|
-
Missing received broadcasts: expected 6600000, got 6588881
|
124
|
-
```
|
125
|
-
|
126
|
-
CPU: 15-25%
|
127
|
-
|
128
|
-
MEM: ~500 MiB
|
129
|
-
|
130
|
-
## JavaScript / uWS (clustered)
|
131
|
-
|
132
|
-
```
|
133
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334
|
134
|
-
|
135
|
-
clients: 1000 95per-rtt: 207ms min-rtt: 0ms median-rtt: 8ms max-rtt: 611ms
|
136
|
-
clients: 2000 95per-rtt: 393ms min-rtt: 2ms median-rtt: 20ms max-rtt: 750ms
|
137
|
-
clients: 3000 95per-rtt: 425ms min-rtt: 4ms median-rtt: 25ms max-rtt: 1196ms
|
138
|
-
clients: 4000 95per-rtt: 483ms min-rtt: 4ms median-rtt: 29ms max-rtt: 626ms
|
139
|
-
clients: 5000 95per-rtt: 481ms min-rtt: 5ms median-rtt: 26ms max-rtt: 1397ms
|
140
|
-
clients: 6000 95per-rtt: 824ms min-rtt: 5ms median-rtt: 54ms max-rtt: 1847ms
|
141
|
-
clients: 7000 95per-rtt: 635ms min-rtt: 6ms median-rtt: 37ms max-rtt: 1602ms
|
142
|
-
clients: 8000 95per-rtt: 782ms min-rtt: 5ms median-rtt: 142ms max-rtt: 1439ms
|
143
|
-
clients: 9000 95per-rtt: 610ms min-rtt: 7ms median-rtt: 72ms max-rtt: 1552ms
|
144
|
-
clients: 10000 95per-rtt: 1216ms min-rtt: 7ms median-rtt: 91ms max-rtt: 2195ms
|
145
|
-
|
146
|
-
Missing received broadcasts: expected 6600000, got 6599571
|
147
|
-
```
|
148
|
-
|
149
|
-
CPU: 7-8%
|
150
|
-
|
151
|
-
MEM: ~400 MiB
|
152
|
-
|
153
|
-
## Go / WebSocket
|
154
|
-
|
155
|
-
```
|
156
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/json
|
157
|
-
|
158
|
-
clients: 1000 95per-rtt: 27ms min-rtt: 7ms median-rtt: 16ms max-rtt: 44ms
|
159
|
-
clients: 2000 95per-rtt: 193ms min-rtt: 12ms median-rtt: 28ms max-rtt: 235ms
|
160
|
-
clients: 3000 95per-rtt: 231ms min-rtt: 15ms median-rtt: 35ms max-rtt: 433ms
|
161
|
-
clients: 4000 95per-rtt: 293ms min-rtt: 19ms median-rtt: 43ms max-rtt: 425ms
|
162
|
-
clients: 5000 95per-rtt: 618ms min-rtt: 27ms median-rtt: 47ms max-rtt: 2253ms
|
163
|
-
clients: 6000 95per-rtt: 297ms min-rtt: 34ms median-rtt: 72ms max-rtt: 619ms
|
164
|
-
clients: 7000 95per-rtt: 449ms min-rtt: 38ms median-rtt: 74ms max-rtt: 5360ms
|
165
|
-
clients: 8000 95per-rtt: 539ms min-rtt: 43ms median-rtt: 89ms max-rtt: 1351ms
|
166
|
-
clients: 9000 95per-rtt: 534ms min-rtt: 48ms median-rtt: 96ms max-rtt: 2978ms
|
167
|
-
clients: 10000 95per-rtt: 414ms min-rtt: 57ms median-rtt: 123ms max-rtt: 3424ms
|
168
|
-
|
169
|
-
Missing received broadcasts: expected 6600000, got 6593825
|
170
|
-
```
|
171
|
-
|
172
|
-
CPU: one core – ~80-100%, other cores – ~7-10%
|
173
|
-
|
174
|
-
MEM: ~400 MiB
|
175
|
-
|
176
|
-
## Erlang / Cowboy
|
177
|
-
|
178
|
-
```
|
179
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/ws/cable
|
180
|
-
|
181
|
-
clients: 1000 95per-rtt: 204ms min-rtt: 2ms median-rtt: 11ms max-rtt: 585ms
|
182
|
-
clients: 2000 95per-rtt: 219ms min-rtt: 3ms median-rtt: 20ms max-rtt: 620ms
|
183
|
-
clients: 3000 95per-rtt: 348ms min-rtt: 6ms median-rtt: 19ms max-rtt: 1447ms
|
184
|
-
clients: 4000 95per-rtt: 440ms min-rtt: 8ms median-rtt: 32ms max-rtt: 961ms
|
185
|
-
clients: 5000 95per-rtt: 574ms min-rtt: 10ms median-rtt: 30ms max-rtt: 1233ms
|
186
|
-
clients: 6000 95per-rtt: 672ms min-rtt: 12ms median-rtt: 40ms max-rtt: 1493ms
|
187
|
-
clients: 7000 95per-rtt: 542ms min-rtt: 13ms median-rtt: 76ms max-rtt: 1392ms
|
188
|
-
clients: 8000 95per-rtt: 737ms min-rtt: 16ms median-rtt: 57ms max-rtt: 1527ms
|
189
|
-
clients: 9000 95per-rtt: 634ms min-rtt: 17ms median-rtt: 74ms max-rtt: 1479ms
|
190
|
-
clients: 10000 95per-rtt: 792ms min-rtt: 17ms median-rtt: 79ms max-rtt: 3805ms
|
191
|
-
|
192
|
-
Missing received broadcasts: expected 6600000, got 6575292
|
193
|
-
```
|
194
|
-
|
195
|
-
cCPU: 20-30%
|
196
|
-
|
197
|
-
MEM: ~500 MiB
|
198
|
-
|
199
|
-
## Ruby / Plezi (1x8)
|
200
|
-
|
201
|
-
```
|
202
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
|
203
|
-
|
204
|
-
clients: 1000 95per-rtt: 84ms min-rtt: 3ms median-rtt: 42ms max-rtt: 95ms
|
205
|
-
clients: 2000 95per-rtt: 211ms min-rtt: 4ms median-rtt: 60ms max-rtt: 318ms
|
206
|
-
clients: 3000 95per-rtt: 525ms min-rtt: 2ms median-rtt: 93ms max-rtt: 527ms
|
207
|
-
clients: 4000 95per-rtt: 502ms min-rtt: 5ms median-rtt: 123ms max-rtt: 601ms
|
208
|
-
clients: 5000 95per-rtt: 807ms min-rtt: 1ms median-rtt: 156ms max-rtt: 869ms
|
209
|
-
clients: 6000 95per-rtt: 942ms min-rtt: 6ms median-rtt: 167ms max-rtt: 1126ms
|
210
|
-
clients: 7000 95per-rtt: 1100ms min-rtt: 1ms median-rtt: 249ms max-rtt: 1181ms
|
211
|
-
clients: 8000 95per-rtt: 1094ms min-rtt: 7ms median-rtt: 298ms max-rtt: 1134ms
|
212
|
-
clients: 9000 95per-rtt: 1265ms min-rtt: 1ms median-rtt: 342ms max-rtt: 1407ms
|
213
|
-
clients: 10000 95per-rtt: 1523ms min-rtt: 2ms median-rtt: 388ms max-rtt: 1555ms
|
214
|
-
|
215
|
-
Missing received broadcasts: expected 6600000, got 6599226
|
216
|
-
```
|
217
|
-
|
218
|
-
CPU: ~10-15% (only 1/2 of cores affected)
|
219
|
-
|
220
|
-
MEM: ~300 MiB
|
221
|
-
|
222
|
-
## Ruby / Plezi (8x8)
|
223
|
-
|
224
|
-
```
|
225
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
|
226
|
-
|
227
|
-
clients: 1000 95per-rtt: 46ms min-rtt: 1ms median-rtt: 8ms max-rtt: 115ms
|
228
|
-
clients: 2000 95per-rtt: 152ms min-rtt: 1ms median-rtt: 17ms max-rtt: 241ms
|
229
|
-
clients: 3000 95per-rtt: 207ms min-rtt: 1ms median-rtt: 26ms max-rtt: 254ms
|
230
|
-
clients: 4000 95per-rtt: 211ms min-rtt: 1ms median-rtt: 54ms max-rtt: 397ms
|
231
|
-
clients: 5000 95per-rtt: 260ms min-rtt: 1ms median-rtt: 33ms max-rtt: 814ms
|
232
|
-
clients: 6000 95per-rtt: 228ms min-rtt: 1ms median-rtt: 34ms max-rtt: 616ms
|
233
|
-
clients: 7000 95per-rtt: 210ms min-rtt: 1ms median-rtt: 59ms max-rtt: 401ms
|
234
|
-
clients: 8000 95per-rtt: 498ms min-rtt: 2ms median-rtt: 58ms max-rtt: 749ms
|
235
|
-
clients: 9000 95per-rtt: 651ms min-rtt: 2ms median-rtt: 52ms max-rtt: 766ms
|
236
|
-
clients: 10000 95per-rtt: 796ms min-rtt: 1ms median-rtt: 90ms max-rtt: 800ms
|
237
|
-
|
238
|
-
Missing received broadcasts: expected 6600000, got 2736158
|
239
|
-
```
|
240
|
-
|
241
|
-
CPU: ~10%
|
242
|
-
|
243
|
-
MEM: ~350 MiB
|
244
|
-
|
245
|
-
**NOTE**: looks like something goes wrong, too high message loss
|
246
|
-
|
247
|
-
## Ruby / EventMachine
|
248
|
-
|
249
|
-
EM shows great results but only for the first run (`em-websocket` bug?).
|
250
|
-
|
251
|
-
First run:
|
252
|
-
|
253
|
-
```
|
254
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
|
255
|
-
|
256
|
-
clients: 1000 95per-rtt: 24ms min-rtt: 5ms median-rtt: 20ms max-rtt: 30ms
|
257
|
-
clients: 2000 95per-rtt: 61ms min-rtt: 13ms median-rtt: 42ms max-rtt: 73ms
|
258
|
-
clients: 3000 95per-rtt: 84ms min-rtt: 18ms median-rtt: 68ms max-rtt: 109ms
|
259
|
-
clients: 4000 95per-rtt: 124ms min-rtt: 21ms median-rtt: 104ms max-rtt: 156ms
|
260
|
-
clients: 5000 95per-rtt: 201ms min-rtt: 30ms median-rtt: 123ms max-rtt: 253ms
|
261
|
-
clients: 6000 95per-rtt: 226ms min-rtt: 41ms median-rtt: 145ms max-rtt: 293ms
|
262
|
-
clients: 7000 95per-rtt: 308ms min-rtt: 43ms median-rtt: 190ms max-rtt: 343ms
|
263
|
-
clients: 8000 95per-rtt: 383ms min-rtt: 52ms median-rtt: 218ms max-rtt: 458ms
|
264
|
-
clients: 9000 95per-rtt: 401ms min-rtt: 50ms median-rtt: 218ms max-rtt: 550ms
|
265
|
-
clients: 10000 95per-rtt: 429ms min-rtt: 60ms median-rtt: 246ms max-rtt: 530ms
|
266
|
-
|
267
|
-
Missing received broadcasts: expected 6600000, got 6599593
|
268
|
-
```
|
269
|
-
|
270
|
-
Second run:
|
271
|
-
|
272
|
-
```
|
273
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
|
274
|
-
|
275
|
-
clients: 1000 95per-rtt: 246ms min-rtt: 47ms median-rtt: 197ms max-rtt: 287ms
|
276
|
-
clients: 2000 95per-rtt: 296ms min-rtt: 63ms median-rtt: 229ms max-rtt: 400ms
|
277
|
-
clients: 3000 95per-rtt: 325ms min-rtt: 184ms median-rtt: 261ms max-rtt: 335ms
|
278
|
-
clients: 4000 95per-rtt: 370ms min-rtt: 76ms median-rtt: 299ms max-rtt: 505ms
|
279
|
-
clients: 5000 95per-rtt: 598ms min-rtt: 83ms median-rtt: 345ms max-rtt: 696ms
|
280
|
-
clients: 6000 95per-rtt: 580ms min-rtt: 87ms median-rtt: 326ms max-rtt: 768ms
|
281
|
-
clients: 7000 95per-rtt: 637ms min-rtt: 79ms median-rtt: 356ms max-rtt: 673ms
|
282
|
-
clients: 8000 95per-rtt: 684ms min-rtt: 92ms median-rtt: 390ms max-rtt: 771ms
|
283
|
-
clients: 9000 95per-rtt: 733ms min-rtt: 102ms median-rtt: 430ms max-rtt: 833ms
|
284
|
-
clients: 10000 95per-rtt: 813ms min-rtt: 101ms median-rtt: 448ms max-rtt: 989ms
|
285
|
-
```
|
286
|
-
|
287
|
-
Third run:
|
288
|
-
|
289
|
-
```
|
290
|
-
bin/websocket-bench broadcast -l 172.31.26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
|
291
|
-
|
292
|
-
clients: 1000 95per-rtt: 522ms min-rtt: 115ms median-rtt: 414ms max-rtt: 719ms
|
293
|
-
clients: 2000 95per-rtt: 558ms min-rtt: 119ms median-rtt: 444ms max-rtt: 763ms
|
294
|
-
clients: 3000 95per-rtt: 499ms min-rtt: 127ms median-rtt: 489ms max-rtt: 833ms
|
295
|
-
clients: 4000 95per-rtt: 538ms min-rtt: 137ms median-rtt: 522ms max-rtt: 882ms
|
296
|
-
clients: 5000 95per-rtt: 867ms min-rtt: 140ms median-rtt: 564ms max-rtt: 1128ms
|
297
|
-
clients: 6000 95per-rtt: 1085ms min-rtt: 151ms median-rtt: 592ms max-rtt: 1344ms
|
298
|
-
clients: 7000 95per-rtt: 960ms min-rtt: 130ms median-rtt: 571ms max-rtt: 1258ms
|
299
|
-
clients: 8000 95per-rtt: 1038ms min-rtt: 145ms median-rtt: 592ms max-rtt: 1179ms
|
300
|
-
clients: 9000 95per-rtt: 1110ms min-rtt: 140ms median-rtt: 625ms max-rtt: 1405ms
|
301
|
-
clients: 10000 95per-rtt: 1176ms min-rtt: 163ms median-rtt: 649ms max-rtt: 1633ms
|
302
|
-
|
303
|
-
Missing received broadcasts: expected 6600000, got 6599123
|
304
|
-
```
|
305
|
-
|
306
|
-
CPU: one core is totally f**ked up
|
307
|
-
|
308
|
-
MEM: ~100 MiB
|