anycable 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: baf24530e96c211b24126f88645c15a1111a670a
4
- data.tar.gz: 0662cb8c6d80ffe9615413b5a72718197ab7ffe6
3
+ metadata.gz: d4c8d5a17b2fdbb6c0bbd0d6e83654c4bd42f8a8
4
+ data.tar.gz: 9c8dcf6244537cdb0f8596fa1bbe036fbc949c4f
5
5
  SHA512:
6
- metadata.gz: 4ab66a28c6ac332bb9bf25b6b57c23c1a24930d337b3c291690927b4b410309d2af4754a706525844026e9b24898952b7f4dada81a754a636170c678e8436805
7
- data.tar.gz: 48b3f74c28380d303bb8b22a1f40c7c82a96f3f22e9d266d816b17c4ff5aa683d395ab1bd754ff10a6762b710a44435c1825202ba65d8825a1aec955525be0b6
6
+ metadata.gz: 3138dae66b1b8eef2462384c4c0d5d8bfa189762dc785e7188dc3e8427839bad632af183924d402dad8b29fcfe745723cd93756dfe8ac60d6053c79fcc44662a
7
+ data.tar.gz: 65ec89f8cb16c4d0a1c669c62c0e1d83efe19d57d332b666fec9e65f181322f4185b55f1476b5b9dc5ef57e32db69c44daf2e24c7ea05030ddb3a121ee18726c
@@ -4,3 +4,4 @@ cache: bundler
4
4
  matrix:
5
5
  include:
6
6
  - rvm: 2.3.3
7
+ - rvm: 2.4.0
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 0.4.3 (2017-02-18)
4
+
5
+ - Update `grpc` version dependency to support Ruby 2.4. ([@palkan][])
6
+
3
7
  ## 0.4.2 (2017-01-28)
4
8
 
5
9
  - Change socket streaming API. ([@palkan][])
data/PITCHME.md CHANGED
@@ -128,7 +128,7 @@
128
128
 
129
129
  ## Let's Make ActionCable Not Suck!
130
130
 
131
- [anycable.evilmartians.io](http://anycable.evilmartians.io/)
131
+ [anycable.evilmartians.io](http://anycable.io/)
132
132
 
133
133
  Vladimir Dementyev [@palkan_tula](http://twitter.com/palkan_tula)
134
134
 
data/README.md CHANGED
@@ -15,12 +15,14 @@ Rails plug-n-play integration has been extracted to [anycable-rails](https://git
15
15
 
16
16
  ## Requirements
17
17
 
18
- - Ruby ~> 2.3, < 2.4 (follow [this issue](https://github.com/grpc/grpc/issues/9296) for Ruby 2.4 support);
18
+ - Ruby ~> 2.3
19
19
  - Redis (for brodcasting, [discuss other options](https://github.com/anycable/anycable/issues/2) with us!)
20
20
 
21
21
  ## How It Works?
22
22
 
23
- <img src="https://trello-attachments.s3.amazonaws.com/5781e0ed48e4679e302833d3/820x987/5b6a305417b04e20e75f49c5816e027c/Anycable_vs_ActionCable_copy.jpg" width="400" />
23
+ ![](https://cdn.evilmartians.com/front/posts/anycable-actioncable-on-steroids/Scheme2-f432434.png)
24
+
25
+ Read our [Wiki](https://github.com/anycable/anycable/wiki) for more.
24
26
 
25
27
  ## Links
26
28
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "anyway_config", "~>0.5.0"
21
- spec.add_dependency "grpc", "~> 1.0"
21
+ spec.add_dependency "grpc", "~> 1.1.0"
22
22
  spec.add_dependency "redis", "~> 3.0"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1"
@@ -0,0 +1,311 @@
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
+ The benchmark measures broadcasting RTT for 10k clients.
7
+
8
+ **NOTE**: memory anc CPU usage was measured by looking at `htop` output.
9
+
10
+ ## Action Cable (8 workers)
11
+
12
+ ```
13
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.
14
+ 26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 10
15
+ 00 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:333
16
+ 4/cable --server-type=actioncable
17
+ clients: 1000 95per-rtt: 700ms min-rtt: 2ms median-rtt: 264ms max-rtt: 854ms
18
+ clients: 2000 95per-rtt: 1155ms min-rtt: 1ms median-rtt: 490ms max-rtt: 1358ms
19
+ clients: 3000 95per-rtt: 1584ms min-rtt: 1ms median-rtt: 769ms max-rtt: 1644ms
20
+ clients: 4000 95per-rtt: 1787ms min-rtt: 1ms median-rtt: 1089ms max-rtt: 2053ms
21
+ clients: 5000 95per-rtt: 2258ms min-rtt: 2ms median-rtt: 1387ms max-rtt: 2594ms
22
+ clients: 6000 95per-rtt: 3068ms min-rtt: 2ms median-rtt: 1733ms max-rtt: 3190ms
23
+ clients: 7000 95per-rtt: 3907ms min-rtt: 1ms median-rtt: 1734ms max-rtt: 4332ms
24
+ clients: 8000 95per-rtt: 4479ms min-rtt: 1ms median-rtt: 2137ms max-rtt: 5469ms
25
+ clients: 9000 95per-rtt: 5734ms min-rtt: 1ms median-rtt: 2356ms max-rtt: 8234ms
26
+ clients: 10000 95per-rtt: 5292ms min-rtt: 1ms median-rtt: 2784ms max-rtt: 6454ms
27
+ 2017/02/12 09:18:45 Missing received broadcasts: expected 6600000, got 6572168
28
+ ```
29
+
30
+ CPU: ~70%
31
+
32
+ MEM: ~ 4 GiB
33
+
34
+ ## Action Cable (16 workers)
35
+
36
+ ```
37
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.
38
+ 26.145 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 10
39
+ 00 --payload-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:333
40
+ 4/cable --server-type=actioncable
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
+ 2017/02/12 09:36:45 Missing received broadcasts: expected 6600000, got 6589644
52
+ ```
53
+
54
+ CPU: ~80-100%
55
+
56
+ MEM: ~ 5 GiB
57
+
58
+ ## ActionCable / Patched (8 workers)
59
+
60
+ About patch: https://github.com/rails/rails/issues/26999
61
+
62
+ ```
63
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
64
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
65
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/cable --serve
66
+ r-type=actioncable
67
+ clients: 1000 95per-rtt: 161ms min-rtt: 1ms median-rtt: 44ms max-rtt: 236ms
68
+ clients: 2000 95per-rtt: 292ms min-rtt: 1ms median-rtt: 43ms max-rtt: 389ms
69
+ clients: 3000 95per-rtt: 359ms min-rtt: 1ms median-rtt: 96ms max-rtt: 556ms
70
+ clients: 4000 95per-rtt: 467ms min-rtt: 1ms median-rtt: 97ms max-rtt: 657ms
71
+ clients: 5000 95per-rtt: 699ms min-rtt: 1ms median-rtt: 101ms max-rtt: 854ms
72
+ clients: 6000 95per-rtt: 556ms min-rtt: 1ms median-rtt: 77ms max-rtt: 713ms
73
+ clients: 7000 95per-rtt: 717ms min-rtt: 1ms median-rtt: 95ms max-rtt: 1145ms
74
+ clients: 8000 95per-rtt: 679ms min-rtt: 1ms median-rtt: 19ms max-rtt: 1089ms
75
+ clients: 9000 95per-rtt: 561ms min-rtt: 1ms median-rtt: 25ms max-rtt: 938ms
76
+ clients: 10000 95per-rtt: 1038ms min-rtt: 1ms median-rtt: 59ms max-rtt: 2197ms
77
+ 2017/02/12 10:33:07 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
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
88
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
89
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/cable --serve
90
+ r-type=actioncable
91
+ clients: 1000 95per-rtt: 228ms min-rtt: 1ms median-rtt: 53ms max-rtt: 425ms
92
+ clients: 2000 95per-rtt: 277ms min-rtt: 1ms median-rtt: 63ms max-rtt: 407ms
93
+ clients: 3000 95per-rtt: 349ms min-rtt: 1ms median-rtt: 28ms max-rtt: 640ms
94
+ clients: 4000 95per-rtt: 459ms min-rtt: 1ms median-rtt: 56ms max-rtt: 699ms
95
+ clients: 5000 95per-rtt: 485ms min-rtt: 1ms median-rtt: 52ms max-rtt: 588ms
96
+ clients: 6000 95per-rtt: 493ms min-rtt: 1ms median-rtt: 86ms max-rtt: 572ms
97
+ clients: 7000 95per-rtt: 466ms min-rtt: 1ms median-rtt: 90ms max-rtt: 739ms
98
+ clients: 8000 95per-rtt: 530ms min-rtt: 1ms median-rtt: 26ms max-rtt: 1225ms
99
+ clients: 9000 95per-rtt: 459ms min-rtt: 1ms median-rtt: 39ms max-rtt: 622ms
100
+ clients: 10000 95per-rtt: 477ms min-rtt: 1ms median-rtt: 71ms max-rtt: 632ms
101
+ 2017/02/12 10:47:09 Missing received broadcasts: expected 6600000, got 5662008
102
+ ```
103
+
104
+ CPU: ~80-100%
105
+
106
+ MEM: ~ 5 GiB
107
+
108
+ ## Action Cable / AnyCable-Go
109
+
110
+ ```
111
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
112
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
113
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/cable --serve
114
+ r-type=actioncable
115
+ clients: 1000 95per-rtt: 172ms min-rtt: 2ms median-rtt: 9ms max-rtt: 220ms
116
+ clients: 2000 95per-rtt: 228ms min-rtt: 2ms median-rtt: 16ms max-rtt: 498ms
117
+ clients: 3000 95per-rtt: 367ms min-rtt: 2ms median-rtt: 14ms max-rtt: 798ms
118
+ clients: 4000 95per-rtt: 426ms min-rtt: 2ms median-rtt: 24ms max-rtt: 965ms
119
+ clients: 5000 95per-rtt: 652ms min-rtt: 2ms median-rtt: 30ms max-rtt: 1062ms
120
+ clients: 6000 95per-rtt: 580ms min-rtt: 2ms median-rtt: 44ms max-rtt: 1306ms
121
+ clients: 7000 95per-rtt: 813ms min-rtt: 2ms median-rtt: 40ms max-rtt: 2270ms
122
+ clients: 8000 95per-rtt: 657ms min-rtt: 2ms median-rtt: 39ms max-rtt: 2457ms
123
+ clients: 9000 95per-rtt: 792ms min-rtt: 2ms median-rtt: 117ms max-rtt: 1557ms
124
+ clients: 10000 95per-rtt: 727ms min-rtt: 2ms median-rtt: 66ms max-rtt: 3391ms
125
+ 2017/02/12 09:24:35 Missing received broadcasts: expected 6600000, got 6588881
126
+ ```
127
+
128
+ CPU: 15-25%
129
+
130
+ MEM: ~500 MiB
131
+
132
+ ## JavaScript / uWS (clustered)
133
+
134
+ ```
135
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
136
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
137
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334
138
+ clients: 1000 95per-rtt: 207ms min-rtt: 0ms median-rtt: 8ms max-rtt: 611ms
139
+ clients: 2000 95per-rtt: 393ms min-rtt: 2ms median-rtt: 20ms max-rtt: 750ms
140
+ clients: 3000 95per-rtt: 425ms min-rtt: 4ms median-rtt: 25ms max-rtt: 1196ms
141
+ clients: 4000 95per-rtt: 483ms min-rtt: 4ms median-rtt: 29ms max-rtt: 626ms
142
+ clients: 5000 95per-rtt: 481ms min-rtt: 5ms median-rtt: 26ms max-rtt: 1397ms
143
+ clients: 6000 95per-rtt: 824ms min-rtt: 5ms median-rtt: 54ms max-rtt: 1847ms
144
+ clients: 7000 95per-rtt: 635ms min-rtt: 6ms median-rtt: 37ms max-rtt: 1602ms
145
+ clients: 8000 95per-rtt: 782ms min-rtt: 5ms median-rtt: 142ms max-rtt: 1439ms
146
+ clients: 9000 95per-rtt: 610ms min-rtt: 7ms median-rtt: 72ms max-rtt: 1552ms
147
+ clients: 10000 95per-rtt: 1216ms min-rtt: 7ms median-rtt: 91ms max-rtt: 2195ms
148
+ 2017/02/12 09:40:31 Missing received broadcasts: expected 6600000, got 6599571
149
+ ```
150
+
151
+ CPU: 7-8%
152
+
153
+ MEM: ~400 MiB
154
+
155
+ ## Go / WebSocket
156
+
157
+ ```
158
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
159
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
160
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/json
161
+ clients: 1000 95per-rtt: 27ms min-rtt: 7ms median-rtt: 16ms max-rtt: 44ms
162
+ clients: 2000 95per-rtt: 193ms min-rtt: 12ms median-rtt: 28ms max-rtt: 235ms
163
+ clients: 3000 95per-rtt: 231ms min-rtt: 15ms median-rtt: 35ms max-rtt: 433ms
164
+ clients: 4000 95per-rtt: 293ms min-rtt: 19ms median-rtt: 43ms max-rtt: 425ms
165
+ clients: 5000 95per-rtt: 618ms min-rtt: 27ms median-rtt: 47ms max-rtt: 2253ms
166
+ clients: 6000 95per-rtt: 297ms min-rtt: 34ms median-rtt: 72ms max-rtt: 619ms
167
+ clients: 7000 95per-rtt: 449ms min-rtt: 38ms median-rtt: 74ms max-rtt: 5360ms
168
+ clients: 8000 95per-rtt: 539ms min-rtt: 43ms median-rtt: 89ms max-rtt: 1351ms
169
+ clients: 9000 95per-rtt: 534ms min-rtt: 48ms median-rtt: 96ms max-rtt: 2978ms
170
+ clients: 10000 95per-rtt: 414ms min-rtt: 57ms median-rtt: 123ms max-rtt: 3424ms
171
+ 2017/02/12 09:49:29 Missing received broadcasts: expected 6600000, got 6593825
172
+ ```
173
+
174
+ CPU: one core – ~80-100%, other cores – ~7-10%
175
+
176
+ MEM: ~400 MiB
177
+
178
+ ## Erlang / Cowboy
179
+
180
+ ```
181
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
182
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
183
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/ws/cable
184
+ clients: 1000 95per-rtt: 204ms min-rtt: 2ms median-rtt: 11ms max-rtt: 585ms
185
+ clients: 2000 95per-rtt: 219ms min-rtt: 3ms median-rtt: 20ms max-rtt: 620ms
186
+ clients: 3000 95per-rtt: 348ms min-rtt: 6ms median-rtt: 19ms max-rtt: 1447ms
187
+ clients: 4000 95per-rtt: 440ms min-rtt: 8ms median-rtt: 32ms max-rtt: 961ms
188
+ clients: 5000 95per-rtt: 574ms min-rtt: 10ms median-rtt: 30ms max-rtt: 1233ms
189
+ clients: 6000 95per-rtt: 672ms min-rtt: 12ms median-rtt: 40ms max-rtt: 1493ms
190
+ clients: 7000 95per-rtt: 542ms min-rtt: 13ms median-rtt: 76ms max-rtt: 1392ms
191
+ clients: 8000 95per-rtt: 737ms min-rtt: 16ms median-rtt: 57ms max-rtt: 1527ms
192
+ clients: 9000 95per-rtt: 634ms min-rtt: 17ms median-rtt: 74ms max-rtt: 1479ms
193
+ clients: 10000 95per-rtt: 792ms min-rtt: 17ms median-rtt: 79ms max-rtt: 3805ms
194
+ 2017/02/12 10:11:21 Missing received broadcasts: expected 6600000, got 6575292
195
+ ```
196
+
197
+ cCPU: 20-30%
198
+
199
+ MEM: ~500 MiB
200
+
201
+ ## Ruby / Plezi (1x8)
202
+
203
+ ```
204
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
205
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
206
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
207
+ clients: 1000 95per-rtt: 84ms min-rtt: 3ms median-rtt: 42ms max-rtt: 95ms
208
+ clients: 2000 95per-rtt: 211ms min-rtt: 4ms median-rtt: 60ms max-rtt: 318ms
209
+ clients: 3000 95per-rtt: 525ms min-rtt: 2ms median-rtt: 93ms max-rtt: 527ms
210
+ clients: 4000 95per-rtt: 502ms min-rtt: 5ms median-rtt: 123ms max-rtt: 601ms
211
+ clients: 5000 95per-rtt: 807ms min-rtt: 1ms median-rtt: 156ms max-rtt: 869ms
212
+ clients: 6000 95per-rtt: 942ms min-rtt: 6ms median-rtt: 167ms max-rtt: 1126ms
213
+ clients: 7000 95per-rtt: 1100ms min-rtt: 1ms median-rtt: 249ms max-rtt: 1181ms
214
+ clients: 8000 95per-rtt: 1094ms min-rtt: 7ms median-rtt: 298ms max-rtt: 1134ms
215
+ clients: 9000 95per-rtt: 1265ms min-rtt: 1ms median-rtt: 342ms max-rtt: 1407ms
216
+ clients: 10000 95per-rtt: 1523ms min-rtt: 2ms median-rtt: 388ms max-rtt: 1555ms
217
+ 2017/02/12 10:18:07 Missing received broadcasts: expected 6600000, got 6599226
218
+ ```
219
+
220
+ CPU: ~10-15% (only 1/2 of cores affected)
221
+
222
+ MEM: ~300 MiB
223
+
224
+ ## Ruby / Plezi (8x8)
225
+
226
+ ```
227
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
228
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
229
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
230
+ clients: 1000 95per-rtt: 46ms min-rtt: 1ms median-rtt: 8ms max-rtt: 115ms
231
+ clients: 2000 95per-rtt: 152ms min-rtt: 1ms median-rtt: 17ms max-rtt: 241ms
232
+ clients: 3000 95per-rtt: 207ms min-rtt: 1ms median-rtt: 26ms max-rtt: 254ms
233
+ clients: 4000 95per-rtt: 211ms min-rtt: 1ms median-rtt: 54ms max-rtt: 397ms
234
+ clients: 5000 95per-rtt: 260ms min-rtt: 1ms median-rtt: 33ms max-rtt: 814ms
235
+ clients: 6000 95per-rtt: 228ms min-rtt: 1ms median-rtt: 34ms max-rtt: 616ms
236
+ clients: 7000 95per-rtt: 210ms min-rtt: 1ms median-rtt: 59ms max-rtt: 401ms
237
+ clients: 8000 95per-rtt: 498ms min-rtt: 2ms median-rtt: 58ms max-rtt: 749ms
238
+ clients: 9000 95per-rtt: 651ms min-rtt: 2ms median-rtt: 52ms max-rtt: 766ms
239
+ clients: 10000 95per-rtt: 796ms min-rtt: 1ms median-rtt: 90ms max-rtt: 800ms
240
+ 2017/02/12 10:14:31 Missing received broadcasts: expected 6600000, got 2736158
241
+ ```
242
+
243
+ CPU: ~10%
244
+
245
+ MEM: ~350 MiB
246
+
247
+ **NOTE**: looks like something goes wrong, too high message loss
248
+
249
+ ## Ruby / EventMachine
250
+
251
+ EM shows great results but only for the first run (`em-websocket` bug?).
252
+
253
+ First run:
254
+
255
+ ```
256
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
257
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
258
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
259
+ clients: 1000 95per-rtt: 24ms min-rtt: 5ms median-rtt: 20ms max-rtt: 30ms
260
+ clients: 2000 95per-rtt: 61ms min-rtt: 13ms median-rtt: 42ms max-rtt: 73ms
261
+ clients: 3000 95per-rtt: 84ms min-rtt: 18ms median-rtt: 68ms max-rtt: 109ms
262
+ clients: 4000 95per-rtt: 124ms min-rtt: 21ms median-rtt: 104ms max-rtt: 156ms
263
+ clients: 5000 95per-rtt: 201ms min-rtt: 30ms median-rtt: 123ms max-rtt: 253ms
264
+ clients: 6000 95per-rtt: 226ms min-rtt: 41ms median-rtt: 145ms max-rtt: 293ms
265
+ clients: 7000 95per-rtt: 308ms min-rtt: 43ms median-rtt: 190ms max-rtt: 343ms
266
+ clients: 8000 95per-rtt: 383ms min-rtt: 52ms median-rtt: 218ms max-rtt: 458ms
267
+ clients: 9000 95per-rtt: 401ms min-rtt: 50ms median-rtt: 218ms max-rtt: 550ms
268
+ clients: 10000 95per-rtt: 429ms min-rtt: 60ms median-rtt: 246ms max-rtt: 530ms
269
+ 2017/02/12 10:22:39 Missing received broadcasts: expected 6600000, got 6599593
270
+ ```
271
+
272
+ Second run:
273
+
274
+ ```
275
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
276
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
277
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
278
+ clients: 1000 95per-rtt: 246ms min-rtt: 47ms median-rtt: 197ms max-rtt: 287ms
279
+ clients: 2000 95per-rtt: 296ms min-rtt: 63ms median-rtt: 229ms max-rtt: 400ms
280
+ clients: 3000 95per-rtt: 325ms min-rtt: 184ms median-rtt: 261ms max-rtt: 335ms
281
+ clients: 4000 95per-rtt: 370ms min-rtt: 76ms median-rtt: 299ms max-rtt: 505ms
282
+ clients: 5000 95per-rtt: 598ms min-rtt: 83ms median-rtt: 345ms max-rtt: 696ms
283
+ clients: 6000 95per-rtt: 580ms min-rtt: 87ms median-rtt: 326ms max-rtt: 768ms
284
+ clients: 7000 95per-rtt: 637ms min-rtt: 79ms median-rtt: 356ms max-rtt: 673ms
285
+ clients: 8000 95per-rtt: 684ms min-rtt: 92ms median-rtt: 390ms max-rtt: 771ms
286
+ clients: 9000 95per-rtt: 733ms min-rtt: 102ms median-rtt: 430ms max-rtt: 833ms
287
+ clients: 10000 95per-rtt: 813ms min-rtt: 101ms median-rtt: 448ms max-rtt: 989ms
288
+ ```
289
+
290
+ Third run:
291
+
292
+ ```
293
+ deplo@ip-172-31-26-145:/webapps/anycable_bench$ bin/websocket-bench broadcast -l 172.31.26.14
294
+ 5 -l 172.31.26.146 -l 172.31.26.147 --concurrent 4 --sample-size 100 --step-size 1000 --paylo
295
+ ad-padding 200 --total-steps 10 --origin http://0.0.0.0 ws://172.31.22.121:3334/
296
+ clients: 1000 95per-rtt: 522ms min-rtt: 115ms median-rtt: 414ms max-rtt: 719ms
297
+ clients: 2000 95per-rtt: 558ms min-rtt: 119ms median-rtt: 444ms max-rtt: 763ms
298
+ clients: 3000 95per-rtt: 499ms min-rtt: 127ms median-rtt: 489ms max-rtt: 833ms
299
+ clients: 4000 95per-rtt: 538ms min-rtt: 137ms median-rtt: 522ms max-rtt: 882ms
300
+ clients: 5000 95per-rtt: 867ms min-rtt: 140ms median-rtt: 564ms max-rtt: 1128ms
301
+ clients: 6000 95per-rtt: 1085ms min-rtt: 151ms median-rtt: 592ms max-rtt: 1344ms
302
+ clients: 7000 95per-rtt: 960ms min-rtt: 130ms median-rtt: 571ms max-rtt: 1258ms
303
+ clients: 8000 95per-rtt: 1038ms min-rtt: 145ms median-rtt: 592ms max-rtt: 1179ms
304
+ clients: 9000 95per-rtt: 1110ms min-rtt: 140ms median-rtt: 625ms max-rtt: 1405ms
305
+ clients: 10000 95per-rtt: 1176ms min-rtt: 163ms median-rtt: 649ms max-rtt: 1633ms
306
+ 2017/02/12 10:28:08 Missing received broadcasts: expected 6600000, got 6599123
307
+ ```
308
+
309
+ CPU: one core is totally f**ked up
310
+
311
+ MEM: ~100 MiB
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Anycable
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anycable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-28 00:00:00.000000000 Z
11
+ date: 2017-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: 1.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.0'
40
+ version: 1.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: redis
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -165,6 +165,7 @@ files:
165
165
  - assets/cpu_chart.gif
166
166
  - assets/cpu_chart2.gif
167
167
  - assets/evlms.png
168
+ - benchmarks/2017-02-12.md
168
169
  - bin/console
169
170
  - bin/setup
170
171
  - circle.yml