staging, debugging, and previewing →Resources are wasted due to low access Microservice Architecture A single application consists of several microservices →A large number of microservices can easily lead to a high waste 2
non-updated services in multiple environments (proposed by Wantedly, Mercari, Lyft, and Ambassador Labs) 1. Propagate contexts that identify environments by adding them to requests 2. Route requests based on the contexts 4
metadata 2. Route requests with Envoy and Istio 6 Istio Build service mesh with Envoy in Kubernetes Envoy A cloud-native proxy deployed as a sidecar Provide observability, telemetry, and traffic management with cloud-native applications
protocols • Not available for other protocols, especially those that cannot have optional data (MySQL, Redis, MQTT, etc.) • Require instrumentation for each protocol 7 ?
adding contexts to requests and propagating them (Dapper, Pinpoint, X-Trace, Pip, and Canopy) Context Propagation Frameworks Reduce the effort in instrumenting by standardizing the context propagation mechanisms (Tracing Plane, Canopy, Pivot Tracing, and Pythia) →All methods depend on specific protocols and platforms 8
independently of application layer protocols Protocol Propagate contexts without interpreting application layer protocols Proxy Route requests to the appropriate environments by using the protocol 9
any application layer protocol, including those that cannot have optional data • Enable to use the same proxy to route requests of any application layer protocol 10
TCP byte stream (as with PROXY Protocol) →Available regardless of the type of application layer protocols PROXY Protocol Protocol-independently propagate source client information through a reverse proxy server the concept is similar, but the content and format of propagated information is different 11 PiCoP Protocol
2 →No conflicts with application layer protocols 12 Byte Description 1-12 The same signature as PROXY Protocol version 2 13 The upper 4 bits: the signature The lower 4 bits: the version
to instrument into applications →Easy to use for context propagation for other purposes Propagate environment ID by using PiCoP Protocol 13 Byte Description 14,15 The byte length of the context 16- The context in the form of key-value pairs (Satisfied Propagators API)
to the appropriate environment based on environment ID Receive the correspondence between an environment ID and a destination service in advance(route information) 14 Environment ID Destination Service EnvA Service[EnvA] EnvB Service[Base](default route) Other Service[Base](default route)
(e.g., MySQL server) Services at the end of request processing in an application do not need to propagate environment ID →Enable to choose whether or not to propagate PiCoP Protocol 15
payload to NGINX server • Measure response time of 10000 requests in 10 seconds • Set the number of simultaneous connections from 1 to 64 • Add ‘Env-Id:Main’ context to HTTP header or PiCoP Protocol Four Conditions With vs. Without PiCoP Proxy PiCoP Proxy vs. Istio Proxy 17
Istio, widely used in existing methods →The delay of PiCoP Proxy is within practical range Evaluation: Proxy Communication Delay 19 almost equal 0.3ms-2.7ms slower
by continuously sending HTTP requests • Scale out to 80% or less CPU utilization for all containers • Compare the number of containers of proxy and NGINX server • Each container’s resource is limited • Change the number of environments from 1 to 100 • Send 100 or 1000 requests per second in total for all environments from clients equal to the number of environments 20
services in the same mechanism and proxy for all protocols, including those that cannot have optional data 23 Cannot have optional data Can have optional data MySQL, PostgreSQL, Memcached, Redis, MongoDB Wire Protocol, MQTT, Kafka Wire Protocol, TDS(Microsoft SQL Server) HTTP, gRPC, AMQP, Cassandra Native Protocol
for each transport layer protocol Available for UDP, QUIC, etc. in addition to TCP Add PiCoP Protocol to the front of the datagram or stream Unidirectional Communication Deploy PiCoP Proxy for services receiving requests Bidirectional Communication Deploy PiCoP Proxy for both services 25
of request processing in an application (e.g., a web server), instrumentation required (as with existing methods) 26 Need instrumentation libraries per each language and protocol Enable to use instrumentation libraries provided by OpenTelemetry
protocol propagates contexts without interpreting application layer protocols • PiCoP proxy routes requests to the appropriate environments by using the protocol • Show practicality in terms of communication delay and resource reduction • Show constraints on connection reuse and asynchronous processing • Available as OSS ( https://github.com/picop-rd ) Future Work • Resolve the above constraints • Evaluate at large cloud-scale clusters • Analysis the applicability of PiCoP protocol to context propagation for other purposes 29 Slide URL: https://onoe.dev/picop-en