travelping / ergw

erGW - Erlang implementations of GGSN or P-GW

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Configurable retry timings for SMF / UPF heartbeats

mgumz opened this issue · comments

Between SMF and UPF continuous heartbeat requests are sent to detect availability of the associated UPFs. If these heartbeat requests are not replied in a given time frame, the UPF is considered to be unavailable and thus all the sessions are released.

The timeout value at the moment is hardcoded and rather strict:

ergw/src/ergw_sx_node.erl

Lines 643 to 647 in 09e97cb

send_heartbeat(#data{dp = #node{ip = IP}}) ->
IEs = [#recovery_time_stamp{
time = ergw_gsn_lib:seconds_to_sntp_time(gtp_config:get_start_time())}],
Req = #pfcp{version = v1, type = heartbeat_request, ie = IEs},
ergw_sx_socket:call(IP, 500, 5, Req, response_cb(heartbeat)).

5s for the first timeout
0.5 time out for retries
5 retries

Which makes it like 7.5s to deduce the UPF is not reachable.

For some deployment scenarios that is a really tight deadline to meet.

With a configurable values the situation could be adjusted to the concrete deployment scenario.

Closed. Implemented in release 2.8.3.