Skip to content

udp_proxy: implement idle timeout and some stats#8999

Merged
mattklein123 merged 12 commits intomasterfrom
next_udp_change
Nov 25, 2019
Merged

udp_proxy: implement idle timeout and some stats#8999
mattklein123 merged 12 commits intomasterfrom
next_udp_change

Conversation

@mattklein123
Copy link
Copy Markdown
Member

Another bunch of work towards
#492.

The remaining work is proper wiring up of upstream cluster
management, host health, etc. and documentation. This will
be done in the next PR.

Risk Level: Low
Testing: New integration/unit tests
Docs Changes: N/A
Release Notes: N/A

Another bunch of work towards
#492.

The remaining work is proper wiring up of upstream cluster
management, host health, etc. and documentation. This will
be done in the next PR.

Signed-off-by: Matt Klein <mklein@lyft.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #8999 was opened by mattklein123.

see: more, trace.

@mattklein123
Copy link
Copy Markdown
Member Author

@danzh2010 @goaway PTAL

Signed-off-by: Matt Klein <mklein@lyft.com>
Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

@envoyproxy/api-shepherds API LGTM modulo nits. There are breaking changes, but this is a v2alpha API.

Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Copy link
Copy Markdown
Contributor

@danzh2010 danzh2010 left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. Looks good over all with a few nits.

Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Copy Markdown
Member Author

@danzh2010 updated PTAL

Copy link
Copy Markdown
Contributor

@danzh2010 danzh2010 left a comment

Choose a reason for hiding this comment

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

LGTM

const Network::UdpRecvData::LocalPeerAddresses addresses_;
const Upstream::HostConstSharedPtr host_;
// TODO(mattklein123): Consider replacing an idle timer for each session with a last used
// time stamp and a periodic scan of all sessions to look for timeouts. This solution is simple,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might consider to use linked hash map to hold all the sessions in that case.
It can also be one alarm per session, but scheduled once per loop instead of once per packet. Not necessarily to be a common idle timer cross all sessions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed there is a bunch we can do. Let's tackle this in a follow up. Thanks for the good discussion. :)

Signed-off-by: Matt Klein <mklein@lyft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants