Productization and Production Readiness Guide

Purpose and scope

This repository is a functional BYOVA gateway example. It demonstrates the Webex Contact Center gRPC contract, connector routing, JWT validation, health checks, and a development monitoring interface. It is not a turnkey production service and has not been capacity-certified for a particular call volume.

This guide is for engineering, platform, security, and operations teams after they have successfully validated their BYOVA integration in a proof of concept. Customer evaluation, compatibility questions, Webex onboarding, and the proof-of-concept path are covered in the Customer Evaluation Guide.

The sections below describe the engineering, security, reliability, and operating capabilities that a customer or implementation partner should add before using a derivative of this gateway in a high-volume contact center. This is a requirements and planning guide, not a supported deployment architecture or a substitute for the responsible organization’s architecture, security, privacy, and operational reviews.

CPU, memory, worker, stream, and session values in the sample configuration are runtime defaults, not production sizing recommendations. Production values must be established by representative load and failure testing.

Production readiness at a glance

The production service should provide all of the following:

Current example versus a production service

Area Current example Production requirement
Metrics Configuration includes metrics_enabled, and the Prometheus client is a dependency, but the gateway does not currently publish an instrumented metrics endpoint. Export application, connector, runtime, and infrastructure metrics to the company’s monitoring platform.
Logging Human-readable console and local file logs. Some messages include a conversation ID. Structured JSON logs with consistent tracking IDs, safe fields, centralized collection, retention, and access controls.
Tracing No end-to-end distributed tracing. OpenTelemetry or an equivalent standard across gRPC handling, routing, and vendor calls.
Alerting No production alert routing or on-call integration. SLO-based alerts routed to PagerDuty or the company’s on-call platform with escalation policies and runbooks.
State Active conversations, recent events, and dashboard history are held in process memory. Define reconnect and failover semantics; externalize the state that must survive instance loss or use a deliberately tested affinity strategy.
Capacity The gRPC thread pool and concurrent-stream settings are hard-coded. Sample session limits are not a validated capacity model. Configurable limits established through load tests, with admission control, autoscaling, and headroom.
Health gRPC health primarily reflects whether agents are registered. The HTTP endpoint is a simple process health response. Separate startup, liveness, readiness, and dependency health; readiness must consider draining, saturation, and critical connector availability.
Deployment A single Python process also starts a Flask development monitoring thread. Independently operable workloads, production process servers, immutable artifacts, multi-zone placement, and controlled rollout.
Transport The application binds an insecure gRPC port and relies on deployment infrastructure for TLS. TLS 1.2 or later on every untrusted hop, verified HTTP/2 behavior, certificate automation, and documented trust boundaries.
Operations Local dashboard and recent in-memory events aid development. Central dashboards, SLOs, alerts, runbooks, incident command, support ownership, and audit history.

The sections below turn these gaps into a production program.

1. Establish service ownership and reliability objectives

Before choosing infrastructure, identify the business impact and the team that owns the gateway in production.

Required ownership decisions

Define service-level indicators

At minimum, measure:

Set SLOs and an error-budget policy for these indicators. Availability and latency targets must reflect the contact center’s business requirements and the dependencies’ own SLOs. Do not adopt generic targets without validating that the complete call path can meet them.

2. Design for high availability and horizontal scale

Deployment topology

Conversation state and routing

The sample stores ConversationProcessor and connector session state in memory. A stream continues on its current instance, but a reconnect or instance failure can lose that state. Productization therefore requires an explicit decision:

  1. Make reconnectable state external and safely reconstruct connector sessions on another instance; or
  2. Use session affinity for reconnects, accept that instance loss terminates affected calls, and document and test that failure behavior.

Do not externalize raw streaming audio by default. Persist only the minimum state needed for the chosen recovery model, protect it as customer data, and apply short, documented TTLs. Prevent simultaneous ownership of the same conversation by using idempotency keys, leases, or another concurrency-control mechanism.

Capacity model

Model capacity from traffic measurements rather than configuration defaults:

peak concurrent sessions = peak session starts per second
                           x average virtual-agent session duration
                           x burst and safety factor

Also model the number of simultaneous turns, audio bitrate, vendor response time, TLS and JWT cost, connection churn, reconnect storms, and telemetry volume. Test at expected peak, peak plus headroom, and instance-loss conditions.

Autoscaling should consider active streams, available session slots, worker/queue saturation, memory, and connector throttling. CPU alone is not sufficient for long-lived streaming calls. Keep reserve capacity so losing a zone or deploying a new version does not exhaust the fleet.

Runtime and connector concurrency

The current synchronous gRPC server uses a thread pool, and the router can share a connector instance across multiple agents and conversations. Before raising concurrency:

Admission control and graceful lifecycle

3. Add production metrics

Expose metrics in Prometheus or OpenTelemetry format and send them to the company’s durable monitoring platform. Metrics must remain useful across many instances and deployments.

Gateway and gRPC metrics

Connector metrics

Runtime and infrastructure metrics

Authentication and configuration metrics

Never put a conversation ID, tracking ID, caller identifier, organization ID, or other unbounded value into a metric label. These create high cardinality and can expose customer data. Use metrics for aggregation and logs or traces for individual-call investigation.

4. Implement structured logging and tracking IDs

Use structured JSON logs written to standard output and collected by the platform. Local rotating files should not be the authoritative production log store.

Correlation model

For every RPC and conversation:

Recommended event fields include:

timestamp, severity, service, environment, version, instance_id,
event_name, message, tracking_id, trace_id, span_id, conversation_id,
rpc_session_id, connector, virtual_agent_id, rpc_method, grpc_status,
session_outcome, duration_ms, retry_count, error_type

Conversation and organization identifiers should be pseudonymized or tokenized if operators do not need the raw value. Use RFC 3339 UTC timestamps and consistent event names and error categories. Log state transitions once at the correct severity rather than emitting entire request or response objects.

Sensitive-data rules

Production logs must not contain:

Add automated redaction and tests for secrets and personal data. Define retention by data class and environment, encrypt logs in transit and at rest, audit access, and provide a documented deletion process. Debug logging must be time-bounded, authorized, and safe to enable on a subset of instances without exposing caller content.

5. Add distributed tracing

Instrument the gateway with OpenTelemetry or the company’s standard tracing framework. Create spans for:

Propagate W3C Trace Context where dependencies support it. Use span links or events for a long-lived stream rather than one unbounded, high-volume span containing every audio chunk. Sample successful traffic at a controlled rate while retaining errors and unusually slow transactions. Apply the same sensitive-data restrictions used for logs.

6. Build actionable dashboards and on-call alerting

Dashboards

Maintain at least three views:

  1. Service overview: traffic, availability, error-budget burn, latency percentiles, active calls, call outcomes, deployments, and dependency health.
  2. Capacity: active versus allowed sessions, workers, queue depth, memory, network, autoscaling state, and zone distribution.
  3. Connector detail: request rate, errors, throttling, timeouts, latency, circuit state, and escalation outcomes for each vendor.

Operators must be able to filter by environment, region, zone, version, connector, RPC method, and bounded error category. Add deployment and configuration-change annotations.

PagerDuty or equivalent integration

Create a dedicated service in PagerDuty or the company’s standard on-call platform, owned by the team operating the gateway. Configure:

Page on user impact or imminent loss of capacity, not every internal error. Good paging signals include:

Use lower-severity notifications or tickets for single-instance restarts, brief dependency errors, capacity trends, and non-urgent certificate warnings. Derive thresholds from SLOs, capacity tests, and real baselines; avoid arbitrary static thresholds.

Every paging alert needs a runbook covering impact, confirmation queries, dependencies, safe mitigation, rollback, escalation, customer communication, and recovery verification. Test alerts end to end before launch and during regular game days.

7. Engineer dependency failure handling

Every connector and network call must define:

Retries must fit within the caller interaction deadline and must not amplify an outage. Propagate cancellation and deadlines so abandoned calls stop consuming vendor and gateway resources. Clean up vendor sessions on all terminal paths, including client cancellation, instance shutdown, timeouts, and partial failures.

8. Strengthen health checks

Expose distinct checks for different consumers:

Avoid making every health probe perform a paid or expensive vendor transaction. Combine passive health from actual calls with controlled synthetic checks. The load balancer should use readiness, while operators and dashboards should see dependency detail separately.

9. Harden security and privacy

Use Security Configuration as a starting point, then complete a formal threat model and security review.

Data plane

Administrative plane

Secrets and software supply chain

Audio and regulated data

Disable audio recording by default in production. If recording is required, obtain privacy and legal approval and define consent, purpose, residency, encryption, access, retention, deletion, and audit requirements. Store recordings outside the application container in an approved encrypted service. Account for PCI DSS, HIPAA, GDPR, regional privacy rules, or other obligations that apply to the contact center.

10. Establish a production delivery process

Deployment tests must include active streams. A successful process start or unary health check does not prove that long-lived audio calls survive the rollout.

11. Validate performance and resilience

Create an automated load harness that behaves like real Webex traffic: long-lived bidirectional gRPC streams, representative audio cadence and size, DTMF and event traffic, JWT validation, connector calls, escalation, cancellation, and reconnect behavior.

Test all of the following:

Measure caller-visible outcomes as well as server throughput. Confirm that the service sheds load predictably, recovers without manual data repair, and does not leak sessions or memory during a long soak test.

Capacity-test reports should record artifact version, instance shape, replica count, limits, traffic model, connector behavior, results, bottlenecks, and approved operating ceiling. Repeat tests after changes to audio handling, connectors, concurrency, telemetry, runtime, or infrastructure.

12. Prepare incident response and disaster recovery

Create version-controlled runbooks for at least:

Define recovery time and recovery point objectives based on business requirements. Back up only durable data that is actually required; ephemeral audio-stream state may not be recoverable. Replicate configuration and required state to the recovery location, document DNS/load-balancer failover, and test restoration and regional failover on a schedule.

After incidents, preserve a timeline using tracking IDs, complete a blameless review, assign corrective actions, and verify those actions through tests or game days.

13. Control cost and data retention

Forecast and monitor cost per concurrent session, call minute, and completed conversation. Include compute, load balancing, NAT/network transfer, vendor usage, state storage, metrics, logs, traces, and approved audio storage. Set budgets and anomaly alerts.

Telemetry volume can be substantial for audio workloads. Use event-based logging, bounded cardinality, trace sampling, and retention tiers. Cost controls must never silently remove the minimum data required to detect incidents or investigate customer impact.

Phase 1: Define the production contract

Phase 2: Make the service observable and bounded

Phase 3: Add resilience and secure delivery

Phase 4: Operationalize

Production launch checklist

The service is not ready for production until the customer or implementation partner can answer yes to every applicable item: