anycable 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -2
  3. data/bin/anycable +1 -1
  4. data/bin/anycabled +30 -0
  5. data/lib/anycable/cli.rb +1 -1
  6. data/lib/anycable/config.rb +4 -2
  7. data/lib/anycable/exceptions_handling.rb +9 -3
  8. data/lib/anycable/handler/capture_exceptions.rb +4 -4
  9. data/lib/anycable/server.rb +22 -6
  10. data/lib/anycable/version.rb +1 -1
  11. metadata +5 -53
  12. data/.github/ISSUE_TEMPLATE.md +0 -25
  13. data/.github/PULL_REQUEST_TEMPLATE.md +0 -31
  14. data/.gitignore +0 -40
  15. data/.hound.yml +0 -3
  16. data/.rubocop.yml +0 -71
  17. data/.travis.yml +0 -16
  18. data/Gemfile +0 -8
  19. data/Makefile +0 -5
  20. data/PITCHME.md +0 -139
  21. data/PITCHME.yaml +0 -1
  22. data/Rakefile +0 -8
  23. data/anycable.gemspec +0 -35
  24. data/assets/Memory3.png +0 -0
  25. data/assets/Memory5.png +0 -0
  26. data/assets/RTT3.png +0 -0
  27. data/assets/RTT5.png +0 -0
  28. data/assets/Scheme1.png +0 -0
  29. data/assets/Scheme2.png +0 -0
  30. data/assets/cpu_chart.gif +0 -0
  31. data/assets/cpu_chart2.gif +0 -0
  32. data/assets/evlms.png +0 -0
  33. data/benchmarks/.gitignore +0 -2
  34. data/benchmarks/2017-02-12.md +0 -308
  35. data/benchmarks/2018-03-04.md +0 -192
  36. data/benchmarks/2018-05-27-rpc-bench.md +0 -57
  37. data/benchmarks/2018-10-27.md +0 -181
  38. data/benchmarks/HowTo.md +0 -23
  39. data/benchmarks/ansible.cfg +0 -9
  40. data/benchmarks/assets/2018-10-27-action-cable-rss.png +0 -0
  41. data/benchmarks/assets/2018-10-27-action-cable-rtt.png +0 -0
  42. data/benchmarks/assets/2018-10-27-anycable-rss.png +0 -0
  43. data/benchmarks/assets/2018-10-27-anycable-rtt.png +0 -0
  44. data/benchmarks/assets/2018-10-27-async-rss.png +0 -0
  45. data/benchmarks/assets/2018-10-27-async-rtt.png +0 -0
  46. data/benchmarks/assets/2018-10-27-falcon-cable-rss.png +0 -0
  47. data/benchmarks/assets/2018-10-27-falcon-cable-rtt.png +0 -0
  48. data/benchmarks/assets/2018-10-27-iodine-cable-rss.png +0 -0
  49. data/benchmarks/assets/2018-10-27-iodine-cable-rtt.png +0 -0
  50. data/benchmarks/assets/2018-10-27-plezi-rss.png +0 -0
  51. data/benchmarks/assets/2018-10-27-plezi-rtt.png +0 -0
  52. data/benchmarks/bench.png +0 -0
  53. data/benchmarks/benchmark.yml +0 -69
  54. data/benchmarks/hosts +0 -5
  55. data/benchmarks/rtt_plot.py +0 -74
  56. data/benchmarks/rtt_plot_test.py +0 -16
  57. data/benchmarks/servers.yml +0 -58
  58. data/circle.yml +0 -8
  59. data/etc/bug_report_template.rb +0 -76
  60. data/protos/rpc.proto +0 -55
data/.hound.yml DELETED
@@ -1,3 +0,0 @@
1
- ruby:
2
- enabled: true
3
- config_file: .rubocop.yml
@@ -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
@@ -1,16 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
-
4
- dist: trusty
5
- sudo: false
6
-
7
- notifications:
8
- email: false
9
-
10
- rvm:
11
- - 2.4.3
12
- - 2.5.1
13
-
14
- before_install:
15
- - gem update --system
16
- - gem install bundler
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
3
-
4
- local_gemfile = "#{File.dirname(__FILE__)}/Gemfile.local"
5
-
6
- if File.exist?(local_gemfile)
7
- eval(File.read(local_gemfile)) # rubocop:disable Lint/Eval
8
- end
data/Makefile DELETED
@@ -1,5 +0,0 @@
1
- all: build
2
-
3
- build:
4
- grpc_tools_ruby_protoc -I ./protos --ruby_out=./lib/anycable/rpc --grpc_out=./lib/anycable/rpc ./protos/rpc.proto
5
- sed -i '' '/'rpc_pb'/d' ./lib/anycable/rpc/rpc_services_pb.rb
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)
@@ -1 +0,0 @@
1
- theme : moon
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "rubocop/rake_task"
4
-
5
- RSpec::Core::RakeTask.new(:spec)
6
- RuboCop::RakeTask.new
7
-
8
- task default: [:rubocop, :spec]
@@ -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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- *.retry
2
- *.pyc
@@ -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