Write the routing table every second and read it at startup (part of #122)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
The prefix handler applies each update to the routing table in memory as it handles it, sorted into announcements and withdrawals as for the live route tables. Each flush first writes at most 20,000 of the table's changed pairs, with every new peer; the rest follow in the next flushes. A failed write puts its changes and new peers back in the table. Stop makes one last flush, and logs the changed pairs left. Startup reads the table before the streamer connects, and logs its pairs, peers and time. The per-peer counts are a slice, so the read takes about a third less time. The health check's start period is 60 seconds, so a full table's read fits before upaas looks. Model: opus-5-5
This commit is contained in:
+7
-2
@@ -139,8 +139,13 @@ EXPOSE 8080
|
||||
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Health check using the health endpoint, on the port PORT names
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
# Health check using the health endpoint, on the port PORT names. During the
|
||||
# start period, Docker 25 and later checks every 5 seconds, and the first pass
|
||||
# makes the container healthy. After it, Docker checks every 30 seconds. The
|
||||
# start period covers the 60 seconds after which upaas reads the health
|
||||
# (README "Running under upaas"). Startup reads the routing table first,
|
||||
# which takes about 25 seconds when the table is full.
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
|
||||
CMD curl -sf "http://localhost:${PORT:-8080}/.well-known/healthcheck.json" || exit 1
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh" ]
|
||||
|
||||
Reference in New Issue
Block a user