Skip to main content

Embedding Lanes

Embedding lanes control how CoreCube shares an embedding provider between two very different kinds of work:

  • Interactive query embeddings — short, latency-sensitive calls used by chat and search.
  • Background document embeddings — larger batches created during ingestion, model changes, and re-embedding.

Without lane control, both kinds of work use the same embedding provider path. A heavy re-embedding job can therefore compete with query embeddings and make chat/search feel slow.

With Embedding lanes enabled, CoreCube gives query embeddings a protected lane and makes background embedding workers slow down or yield when queries need the provider.

Where to find this page in the product

Admin Console → Embedding → Lanes.

What embedding lanes do

Embedding lanes do not change the embedding model. They change admission control: which embedding calls are allowed to reach the provider at the same time.

CoreCube uses three practical protections:

ProtectionWhat it does
Interactive admissionQuery embeddings use the interactive lane instead of waiting behind all background batches.
Background worker yieldingWhen a query is waiting, background workers pause before starting their next embedding batch.
Bounded query wait + fallbackIf a query cannot get a lane permit in time, retrieval falls back to keyword search instead of hanging forever.

Lane control does not interrupt an embedding request that is already running inside the provider. It prevents too much new background work from entering the provider and makes workers yield between batches.

Performance settings vs. lane settings

The Performance presets still decide how much background embedding work CoreCube tries to run. For example, a preset can configure:

  • worker count
  • batch concurrency per worker
  • batch size

Lane settings decide how much of that requested work may actually call the embedding provider at once.

The effective background embedding concurrency is:

actual background calls = min(workers × batch concurrency, background lane limit)

Example:

SettingValue
Performance presetBalanced
Worker count1
Batch concurrency2
Background lane limit1
Actual background provider callsmin(1 × 2, 1) = 1

If you switch the performance preset to a higher-throughput mode but leave Background concurrency at 1, the extra workers can prepare and wait, but only one background embedding call reaches the provider at a time.

Think of the controls this way:

  • Performance settings are how much background work CoreCube wants to schedule.
  • Lane settings define how many provider calls that work is allowed to consume.

UI reference

The Embedding Lanes section contains live status, presets, and advanced controls.

Embedding lanes toggle

The Embedding lanes switch is the main feature flag. It is enabled by default when no explicit setting has been saved.

StateBehavior
OffQuery and document embeddings use the prior shared path. Performance settings fully control background parallelism.
OnQuery embeddings use the interactive lane, background workers use background permits, and query pressure can make workers yield.

When the toggle is off, the lanes table still shows the configured lane limits, but the lanes are not active.

Provider state

Provider state summarizes the current embedding provider profile and health.

FieldMeaning
Local profileCoreCube inferred a local provider, usually because the active embedding provider has no API key configured.
Cloud/API profileCoreCube inferred a managed API provider, usually because an API key is configured.
Healthy / saturated / rate-limited / circuit openCurrent provider health from lane and embedding-provider telemetry.

Local providers usually need conservative lane settings. Cloud providers can often tolerate more parallel requests.

Query protection

Query protection shows whether background workers are currently yielding to query pressure.

StateMeaning
No active yieldNo recent query pressure is causing background workers to pause.
Yield activeA query recently needed the provider, so background workers are pausing between batches.

This state is most useful while a re-embedding job is running and users are actively querying the system.

Recent query degradations

This counter increases when query embedding could not complete normally and CoreCube had to degrade retrieval, such as falling back to keyword search.

0 is the expected value in a healthy system. A rising number means queries are not getting lane permits quickly enough or the embedding provider is timing out.

Embedding lanes table

The table shows live lane state.

ColumnMeaning
LaneInteractive, Background, or Maintenance.
LimitMaximum concurrent calls allowed for that lane.
In flightCalls currently holding a lane permit.
WaitingCalls waiting for a lane permit.
AvailableRemaining slots for the lane.
P95 waitRecent 95th-percentile wait time for a lane permit.
TimeoutsCalls that could not get a lane permit in time.
YieldsTimes background workers paused because queries needed provider access.
Last successMost recent successful embedding call for that lane.

The important row for chat/search responsiveness is Interactive. The important row for document embedding throughput is Background.

Provider presets

Provider presets are safe starting points.

PresetBest forBehavior
Local-safeLocal CPU/GPU/MPS embedding serversKeeps concurrency conservative and makes background workers yield for queries.
Cloud/APIManaged embedding APIsRaises interactive and background limits for providers that support parallel calls.

For local providers, start with Local-safe. For cloud providers, use Cloud/API only after checking provider rate limits and account quotas.

Lane controls

ControlWhat it changes
Interactive concurrencyNumber of query embedding calls that may run at once.
Background concurrencyNumber of document/chunk embedding calls that may run at once across workers.
Maintenance concurrencyNumber of maintenance embedding calls that may run at once.
Query wait budgetHow long a query may wait for a lane permit before retrieval degrades.
Yield windowHow long background workers treat recent query pressure as active.
Query cache TTLHow long repeated query embeddings stay cached.
Query cache entriesMaximum number of cached query embeddings.
Yield background workers when a query is waitingMakes background workers pause between batches when query pressure is detected.

Settings and API

Embedding lane settings live in the shared settings table. The admin UI writes them through typed retrieval-config endpoints rather than the generic settings surface.

Setting keyMeaning
embedding_lanes_enabledTurns the lane admission path on or off. Defaults to on.
embedding_lanes_provider_profileExplicit local/cloud/custom profile override for lane presets.
embedding_interactive_max_concurrencyMaximum concurrent query embedding calls.
embedding_background_max_concurrencyCross-worker background embedding call limit.
embedding_maintenance_max_concurrencyMaintenance embedding call limit.
embedding_background_yield_on_queryWhether workers pause when query pressure is present.
embedding_background_yield_window_msHow long query pressure stays active for workers.
embedding_interactive_wait_budget_msMaximum query wait for a lane permit.
embedding_query_cache_ttl_secondsQuery embedding cache lifetime.
embedding_query_cache_max_entriesQuery embedding cache size cap.
embedding_provider_lane_modeshared or split endpoint routing.
embedding_query_endpoint_overrideOptional query-only endpoint in split mode.
embedding_background_endpoint_overrideOptional background-only endpoint in split mode.

The admin API surface is:

EndpointPurpose
GET /api/retrieval/config/lanesRead lane status, settings, and query timeout.
PATCH /api/retrieval/config/lane-settingsUpdate lane settings.
POST /api/retrieval/config/lane-presetApply local-safe or cloud-api.
POST /api/retrieval/config/lane-probeProbe split query/background endpoints.
PUT /api/retrieval/config/lane-configSave shared/split lane endpoint routing.

For a local embedding provider:

ControlRecommended value
Performance presetBalanced
Interactive concurrency1
Background concurrency1
Maintenance concurrency1
Yield background workersOn

This keeps document embedding moving while making chat/search more responsive.

For a managed embedding API:

ControlRecommended value
Performance presetFast
Interactive concurrency2
Background concurrency2 or higher, within provider limits
Maintenance concurrency1
Yield background workersOn

Raise concurrency gradually. If you see rate-limit cooldowns, query degradations, or provider timeouts, lower background concurrency first.

Advanced query/background split

The advanced split section is optional. It lets you send query embeddings and background embeddings to different compatible embedding endpoints.

Common examples:

  • a fast endpoint reserved for query embeddings
  • a higher-throughput endpoint for document re-embedding
  • two local inference processes pinned to different hardware resources

Before saving a split configuration, CoreCube probes both endpoints and verifies that they are compatible:

  • same embedding dimensions
  • same model behavior
  • same input mode
  • same normalization

CoreCube rejects split lanes when the probe fails. Query and document embeddings must remain compatible because they are compared in the same vector index.

Troubleshooting

SymptomWhat to check
Chat/search slows down during re-embeddingTurn on Embedding lanes, use Local-safe, and keep Background concurrency low.
Document embedding is slower than expectedCheck whether Background concurrency is lower than the Performance preset's requested parallelism.
Recent query degradations increaseLower Background concurrency, increase Query wait budget carefully, or check provider health.
Yields keep increasingUsers are querying while background work is active; this is expected when query protection is doing its job.
Provider is rate-limitedLower background concurrency and check provider account limits.
Split lanes cannot be savedRun the probe and confirm both endpoints produce compatible embeddings.

We use cookies for analytics to improve our website. More information in our Privacy Policy.