Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

gossip server scaling hackery #305

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft

gossip server scaling hackery #305

wants to merge 19 commits into from

Conversation

evanmcc
Copy link
Contributor

@evanmcc evanmcc commented Dec 22, 2020

some attempts to make the scaling situation better for the seed nodes.

@@ -63,7 +64,7 @@ handle_data(Pid, StreamPid, Key, {Path, Bin}) ->
gen_server:cast(Pid, {handle_data, StreamPid, Key, ListOrData}).

accept_stream(Pid, SessionPid, StreamPid, Path) ->
gen_server:call(Pid, {accept_stream, SessionPid, StreamPid, Path}).
gen_server:call(Pid, {accept_stream, SessionPid, StreamPid, Path}, 30000).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make the timeout configurable?

lager:warning("Stopping on accept_stream exit: ~s",
[error_logger_lager_h:format_reason(Exit)]),
{stop, normal}
libp2p_session:identify(Session, self(), {ignore, self(), Path}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make this the body of the accept_stream function and make handle_identify private to the gossip server

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants