Сергей Прохоров
40dfa84d61
Add some docstrings to tests
2019-03-05 01:30:38 +01:00
Сергей Прохоров
eea142f6fe
Add property-based tests to mtp_codec
2019-03-05 01:30:02 +01:00
Сергей Прохоров
59b1af2338
Fix get_stacktrace deprecation warning
2019-03-05 00:10:56 +01:00
Сергей Прохоров
26c8ce5c60
Add erlang 21.2 to travis.yml
2019-03-04 22:59:03 +01:00
Сергей Прохоров
109049591e
Upgrade rebar3 to 3.9.0
2019-03-04 22:57:20 +01:00
Сергей Прохоров
e9ece4c817
Split mtp_test_middle_server to 2 modules
...
- one with just middle-server implementation
- one with proxy config mock and multi-server DC setup
2019-03-04 11:15:07 +01:00
Сергей Прохоров
8a80fd4b59
Fix common test (webserver root dir)
2019-03-04 11:07:42 +01:00
Сергей Прохоров
8be2a3da0e
Add test proxy client and some basic common-tests
2019-03-04 01:44:47 +01:00
Сергей Прохоров
ad2ab9425a
Fix inconsistency in mtp_codec:fold_packets
2019-03-04 01:34:34 +01:00
Сергей Прохоров
d1398b5bb3
Property-based tests for mtp_rpc
2019-03-01 23:25:24 +01:00
Сергей Прохоров
30d88211e4
Merge branch 'master' into multiplexing
2019-03-01 22:49:06 +01:00
Сергей Прохоров
871ab11ad3
Add fake telegram "middle-proxy" server and http config server implementations
...
And make it possible to make proxy connect to it
2019-03-01 17:00:54 +01:00
Сергей Прохоров
aa6e06a4d5
Move handshake packet encoding/decoding from mtp_down_con to mtp_rpc
2019-03-01 16:59:57 +01:00
Сергей Прохоров
229ca2b6b8
Add property-based tests for codecs
2019-02-24 22:19:17 +01:00
Сергей Прохоров
2f015e2f3f
Make it possible to configure docker via environment variables
2019-02-18 00:37:47 +01:00
Сергей Прохоров
1cf3a34b77
Make it possible to configure docker via environment variables
2019-02-18 00:37:00 +01:00
Сергей Прохоров
80e6b268ec
Add more detailed traffic metrics (tx and rx, per-listener and per-dc)
2019-02-16 20:50:12 +01:00
Сергей Прохоров
da597f0f8c
Return more details about downstream socket errors
2019-02-16 20:50:12 +01:00
Сергей Прохоров
46c37ae6a7
All dialyzer errors fixed; dialyzer added to travis.yml
2019-02-16 20:50:12 +01:00
Сергей Прохоров
8031dafa20
Fix "maybe_close_down" race-condition
...
If downstream connection pool crashed and recovered while some
upstream was alive holding it's DC ID, it may return downstream
taken from the old incarnation of pool to new one because it's
registered under the same name.
Fix is to hold pool's PID instead of name
2019-02-16 20:50:12 +01:00
Сергей Прохоров
e9f999a151
Stop ranch listeners in 'prep_stop', not 'stop' application callback
2019-02-16 20:50:12 +01:00
Сергей Прохоров
bf01459be5
Handle some of 'unknown_upstream' errors as expected race-condition
2019-02-16 20:50:12 +01:00
Сергей Прохоров
8026fb5552
Detect downstream connection attempt failure quicker
...
By checking for monitor message
2019-02-16 20:50:12 +01:00
Сергей Прохоров
79fb6015f6
Experimental backpressure for downstream
2019-02-16 20:50:12 +01:00
Сергей Прохоров
6bc9253999
Don't report tcp socket error as gen_server error
2019-02-16 20:50:12 +01:00
Сергей Прохоров
414e7bc037
Fix some dialyzer errors
2019-02-16 20:50:12 +01:00
Сергей Прохоров
447639224f
Simplify codecs. Use fixed/flat 2-layer codec instead of tree
2019-02-16 20:50:11 +01:00
Сергей Прохоров
590a633ab7
Refactor self-healtcheck
...
* Trigger GC with lower threshold
* Unconditionally die if queue len is too large
2019-02-16 20:50:11 +01:00
Сергей Прохоров
4f30749d83
Make multiplexed downstream socket buffer size tunable
2019-02-16 20:50:11 +01:00
Сергей Прохоров
0af1923ca2
Minor cleanups
2019-02-16 20:49:26 +01:00
Сергей Прохоров
120bf6a46e
Garbage-collect self before making final decision about termination
2019-02-16 20:49:25 +01:00
Сергей Прохоров
835f82aa73
Terminate upstream if it have too long queue and uses too much memory
2019-02-16 20:49:25 +01:00
Сергей Прохоров
88dddb5ed4
Better handling of down connection termination
2019-02-16 20:49:25 +01:00
Сергей Прохоров
dd8a8d48ef
Use standard process registration for dc pools instead of ETS
...
There was a race-condition, that caused crashes.
We could use gproc, but it feels a bit overkill for ~10-20 processes
2019-02-16 20:49:25 +01:00
Сергей Прохоров
8669db42f9
Fix metric
2019-02-16 20:49:25 +01:00
Сергей Прохоров
f67f88f8c9
Metrics fixed
2019-02-16 20:49:25 +01:00
Сергей Прохоров
91b89061e4
Add monitor dc_pool <-> down_conn
2019-02-16 20:48:06 +01:00
Сергей Прохоров
15bff24888
Bit more logging
2019-02-16 20:47:27 +01:00
Сергей Прохоров
b0f6ee2958
Fix rpc_close_ext
2019-02-16 20:47:27 +01:00
Сергей Прохоров
a182c3be65
Fix wrong match pattern
2019-02-16 20:47:27 +01:00
Сергей Прохоров
a28cb437f9
Add "status" for dc pools; add initial burst handling for pool growth
2019-02-16 20:47:27 +01:00
Сергей Прохоров
a8803a7b66
Add multiplexing draft
2019-02-16 20:46:24 +01:00
Сергей Прохоров
8dd4511701
Make it possible to overwrite port/secret/tag from docker command-line
2019-02-16 20:27:42 +01:00
Сергей Прохоров
34eb21dc00
Bump version
2019-02-16 20:27:41 +01:00
Сергей Прохоров
e46e69b77f
Fix docker build for cases when prod-* configs already exist
2019-02-16 20:27:41 +01:00
Сергей Прохоров
68c4659fdb
Add epmd systemd service on systems that don't have it. Fixes #5
2019-02-16 20:27:41 +01:00
Сергей Прохоров
1726701e2d
Add xref check to travis
2019-02-16 20:27:41 +01:00
Сергей Прохоров
2b24b366c8
Upgrade ranch to 1.7
2019-02-16 20:27:34 +01:00
Сергей Прохоров
9d7903e8f4
Fix some deprecation warnings
2019-02-16 17:16:02 +01:00
Сергей Прохоров
f47ba71336
Add 'dumb-init' to docker
2019-01-26 22:58:05 +01:00