Skip to content

Go v2: performance & FFI-boundary SLA validation #27317

Description

@ananth7592

Part of the Cosmos DB Go SDK v2 (azcosmos/v2) effort, delivering the Go v2 data plane over an FFI/cgo binding to the shared Rust Cosmos driver (decision: Azure/azure-sdk-for-go#27238, ADR docs/adr/0001-go-v2-uses-ffi.md). The FFI boundary is new latency/throughput surface and must be validated before GA. Self-contained; owners decide how to complete it.

Scope

  • Baseline from Rust: use the Rust benchmark suite (azure_data_cosmos_benchmarks; see its docs/PPCB_MEMORY_ANALYSIS.md methodology) as the native reference.
  • Boundary cost: measure the added cost of Go-over-FFI vs Rust-native for the same op and target — per-call cgo transition latency, argument/result marshalling, copy overhead.
  • Under load: throughput and tail latency (P99, gated to the Cosmos latency SLA) under concurrency; GC/goroutine-scheduler interaction given cgo pins an OS thread per in-flight call; memory/allocation profile.
  • Regression tracking: perf gates in CI with budgets so boundary overhead can't silently grow release over release.

Deliverables

  • A Go perf harness reusing the Rust benchmark scenarios; a published per-op FFI-overhead budget and a P99 comparison vs Rust-native; a CI perf gate.

Definition of done

  • Measured FFI overhead within the agreed budget; P99 meets the SLA target on the reference matrix; perf gate wired into CI. Gates GA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.Cosmos

    Type

    No type

    Projects

    Status
    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions