Skip to content

Release prep - #51

Merged
tadeas-hejnic merged 4 commits into
mainfrom
develop
Jul 16, 2026
Merged

Release prep#51
tadeas-hejnic merged 4 commits into
mainfrom
develop

Conversation

@tadeas-hejnic

@tadeas-hejnic tadeas-hejnic commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Changelog Description

This pull request introduces several improvements to the AYON C++ API, focusing on connection efficiency, request batching, and header handling. The main changes include enabling persistent keep-alive connections for the HTTP client, adding a new serial batch path resolution method, and improving header logic to avoid unnecessary errors when a site ID is not present.

Connection Handling Improvements

  • The HTTP client (httplib::Client in AyonApi) now reuses TCP/TLS connections by default, significantly reducing latency for serial and batched requests. This behavior can be disabled by setting the AYON_RESOLVER_NO_KEEPALIVE environment variable.

Batch Path Resolution Enhancements

  • Added a new method, batchResolvePathSerial, which resolves a vector of URIs in a single batched POST request using the persistent client. This method splits large batches into capped chunks to prevent overloading the server and matches the chunk size used in async requests. [1] [2] [3]

Request Header Logic

  • Improved header handling by only including the X-ayon-site-id header when a valid site ID is present. This prevents server errors for service accounts or machines without a registered site.

Testing notes:

Testing is not needed - tested already before merging to develop.

timkeller and others added 4 commits June 8, 2026 11:12
Enable keep-alive on the AyonApi httplib client so the TCP/TLS connection is
reused across resolves instead of a fresh handshake per request; over a WAN
link the handshake dominates per-call latency. Keep-alive can be disabled with
AYON_RESOLVER_NO_KEEPALIVE=1 for benchmarking.

Add batchResolvePathSerial(): resolve a whole frontier of uris in one POST over
that persistent client, split into capped chunks (m_maxSerialBatchSize) so a
large frontier never sends an unbounded request or holds a server DB connection
for the full set.
The AYON server rejects /api/resolve with HTTP 400 when the X-ayon-site-id
header is present but empty or names an unregistered site. That breaks
resolution on service-account and cloud workstations with no registered site.
Add the header only when m_siteId is non-empty.
Reuse HTTP connection and add chunked single-request batch resolve
@tadeas-hejnic
tadeas-hejnic requested a review from antirotor July 16, 2026 08:11
@tadeas-hejnic
tadeas-hejnic merged commit a233d01 into main Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants