plantuml
@startuml
actor "Slow Connection\nClient (1.5 Mbps)" as SlowClient
actor "Fast Connection\nClient (10 Mbps)" as FastClient
participant "API Gateway" as Gateway
participant "Content Service" as Content
SlowClient -> Gateway: GET /api/v1/media\nDownlink: 1.5\nECT: 3g
Gateway -> Content: Request optimized\nfor low bandwidth
Content -> Content: Select low-quality\nassets, compress aggressively
Content --> Gateway: Lightweight payload\n(50KB images, 480p video)
Gateway --> SlowClient: 200 OK\nVary: Downlink\n[optimized response]
FastClient -> Gateway: GET /api/v1/media\nDownlink: 10.0\nECT: 4g
Gateway -> Content: Request full\nquality assets
Content -> Content: Select high-quality\nassets, prefetch enabled
Content --> Gateway: Rich payload\n(300KB images, 1080p video)
Gateway --> FastClient: 200 OK\nVary: Downlink\n[full response]
note right
Both clients get optimal
experience for their actual
network conditions
end note
@enduml