mirror of
https://github.com/DeBrosOfficial/orama.git
synced 2026-06-17 02:54:13 +00:00
The 5-10s RPCs that broke calling were not cold-start — they were per-RPC sequential rqlite reads, each forwarded to a raft leader that geography-blind election had placed on a 256ms-distant node. Lever A (serverless): cache function metadata + env vars in-process (5s TTL, invalidated on deploy/enable/disable/delete) and stop the hot invoke path re-fetching the function for the authorization check — removes ~820ms of leader-routed pre-flight reads from every op. Lever B (namespace): a locality-aware leadership reconciler hands raft leadership off a geographically-isolated namespace leader to the nearest co-located voter, via rqlite's transfer-leadership API. All nodes stay voters — membership, quorum and fault tolerance are unchanged. Cuts the per-hop cost from ~274ms to ~20ms when a distant node had become leader.