Skip to content

Conversation

@sitole
Copy link
Member

@sitole sitole commented Oct 6, 2025

  • Adjustments in sandbox catalog impl to lower memory cache ttl, removed global lock
  • Logic that was currently handling storing data in Redis is now also using sandbox catalog impl

Note

Integrates a shared sandbox catalog (Redis/memory) across API DNS and client-proxy, replacing prior sandboxes impl and locks, simplifying sandbox resolution, and bumping ttlcache.

  • Shared:
    • New sandbox-catalog package (packages/shared/pkg/sandbox-catalog): defines SandboxesCatalog with SandboxInfo (adds OrchestratorIP), memory and Redis impls.
      • Lowers local cache TTLs; removes global Redis lock; updates Redis key to sandbox:catalog:<id>; tighter timeouts and error handling.
    • Bump github.com/jellydator/ttlcache/v3 to v3.4.0 across modules.
  • API:
    • DNS integration (internal/dns/server.go): switch from local smap to catalog usage; Add/Remove now accept SandboxInfo/executionID and persist routing in catalog.
    • Orchestrator lifecycle: populate SandboxInfo (incl. OrchestratorIP, max lifetime) on add; remove via executionID.
  • Client Proxy:
    • Replace internal edge/sandboxes with shared sandbox-catalog in pass-through events, REST handlers, proxy, and service wiring.
    • Catalog entries now include OrchestratorIP; proxy resolution reads IP directly and NewClientProxy drops orchestrators pool param.
    • Remove Redsync/cluster lock; minor renames (e.g., Ip -> IP), logging/telemetry tweaks, and service discovery/logger alias cleanups.

Written by Cursor Bugbot for commit 4885309. This will update automatically on new commits. Configure here.

sitole added 6 commits October 6, 2025 16:32
Redis lock was global that is possible bottleneck when there is big
number of concurrently spawned sandboxes. Now catalog create and delete
is called from api that is single running instance so there should be no
issue.
Now new memory cache ttl is 500ms replacing original 5s that can cause
race conditions when you will run sadnbox, pause and resume on another
node fast, some edge proxy instances can still route your traffic to old
node.
@sitole sitole self-assigned this Oct 6, 2025
@sitole sitole added the improvement Improvement for current functionality label Oct 6, 2025
@linear
Copy link

linear bot commented Oct 6, 2025

@sitole
Copy link
Member Author

sitole commented Oct 6, 2025

You can try with changes from 4f34122 that will disable DNS check on client proxy, and only the sandbox catalog backed by Redis will be used.

@sitole sitole removed their assignment Oct 6, 2025
@sitole sitole marked this pull request as ready for review October 6, 2025 15:35
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@jakubno jakubno self-assigned this Oct 6, 2025
@sitole sitole requested a review from jakubno October 6, 2025 16:59
@jakubno jakubno merged commit 0fe22bf into main Oct 6, 2025
26 checks passed
@jakubno jakubno deleted the fix/client-proxy-use-redis-for-routing-instead-of-dns-eng-3125 branch October 6, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement for current functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants