Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mtproto_proxy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mtproto_proxy
Commits
efafd37c
Unverified
Commit
efafd37c
authored
Mar 08, 2019
by
Сергей Прохоров
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tune socket receive buffer sizes to fix false positive backpressure
parent
23ef74a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
mtp_test_client.erl
test/mtp_test_client.erl
+1
-0
single_dc_SUITE.erl
test/single_dc_SUITE.erl
+4
-0
No files found.
test/mtp_test_client.erl
View file @
efafd37c
...
@@ -19,6 +19,7 @@ connect(Host, Port, Secret, DcId, Protocol) ->
...
@@ -19,6 +19,7 @@ connect(Host, Port, Secret, DcId, Protocol) ->
Opts
=
[{
packet
,
raw
},
Opts
=
[{
packet
,
raw
},
{
mode
,
binary
},
{
mode
,
binary
},
{
active
,
false
},
{
active
,
false
},
{
buffer
,
1024
},
{
send_timeout
,
5000
}],
{
send_timeout
,
5000
}],
{
ok
,
Sock
}
=
gen_tcp
:
connect
(
Host
,
Port
,
Opts
,
1000
),
{
ok
,
Sock
}
=
gen_tcp
:
connect
(
Host
,
Port
,
Opts
,
1000
),
{
Header
,
_,
_,
CryptoLayer
}
=
mtp_obfuscated
:
client_create
(
Secret
,
Protocol
,
DcId
),
{
Header
,
_,
_,
CryptoLayer
}
=
mtp_obfuscated
:
client_create
(
Secret
,
Protocol
,
DcId
),
...
...
test/single_dc_SUITE.erl
View file @
efafd37c
...
@@ -169,6 +169,10 @@ downstream_size_backpressure_case(Cfg) when is_list(Cfg) ->
...
@@ -169,6 +169,10 @@ downstream_size_backpressure_case(Cfg) when is_list(Cfg) ->
%% @doc test downstream backpressure when count of non-acknowledged packets grows above threshold
%% @doc test downstream backpressure when count of non-acknowledged packets grows above threshold
downstream_qlen_backpressure_case
({
pre
,
Cfg
})
->
downstream_qlen_backpressure_case
({
pre
,
Cfg
})
->
application
:
load
(
mtproto_proxy
),
%% Reducing downstream socket buffer size. Otherwise we can get queue overflow from just single
%% socket data packet
application
:
set_env
(
mtproto_proxy
,
downstream_socket_buffer_size
,
1024
),
Cfg1
=
setup_single
(
?
FUNCTION_NAME
,
?
LINE
,
#
{
rpc_handler
=>
mtp_test_cmd_rpc
},
Cfg
),
Cfg1
=
setup_single
(
?
FUNCTION_NAME
,
?
LINE
,
#
{
rpc_handler
=>
mtp_test_cmd_rpc
},
Cfg
),
%% Disable upstream healthchecks
%% Disable upstream healthchecks
application
:
set_env
(
?
APP
,
upstream_healthchecks
,
[]),
application
:
set_env
(
?
APP
,
upstream_healthchecks
,
[]),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment