Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

GRPC: AWS ALB “downgrades HTTP/2 → HTTP/1.1

Excellent question. When we say AWS ALB “downgrades HTTP/2 → HTTP/1.1”, it means that although the client connects to ALB over HTTP/2, ALB then connects to your backend (e.g., EKS service or pod) using HTTP/1.1.

This causes loss of several core gRPC features, because gRPC requires HTTP/2 end-to-end to function properly.


📉 What’s Lost During the Downgrade (HTTP/2 → HTTP/1.1)

gRPC FeatureLost or Broken?Why It Matters
Streaming (client/server/bidi)❌ LostHTTP/1.1 can’t multiplex or maintain bidirectional streams
HTTP/2 Trailers❌ LostgRPC uses trailers for grpc-status, grpc-message → clients can’t detect errors correctly
Multiplexing❌ LostHTTP/2 can handle multiple streams over one connection, HTTP/1.1 cannot
Header Compression (HPACK)❌ LostIncreases payload size and latency
Flow Control per Stream❌ LostHTTP/1.1 has global flow control → less efficient
Binary Framing⚠️ May breakgRPC uses strict framing over HTTP/2 → framing can get corrupted
gRPC Metadata Headers⚠️ IncompleteCustom headers like grpc-timeout may be stripped or altered

✅ What Gets Passed (But Not Fully gRPC-Compatible)

ElementPassed by ALB?Note
HTTP POST✅ YesgRPC uses POST method
Content-Type✅ Yesapplication/grpc usually retained
Basic Protobuf Payload⚠️ PartiallyStill sent, but streaming/chunking could corrupt it
TLS Termination✅ YesALB can terminate TLS and forward plaintext internally
Status Code (e.g., 200, 500)✅ BasicBut not the gRPC-specific status like grpc-status

🧠 What Happens in Practice?

A native gRPC client (e.g., Go, Python, Node) expects:

  • Streaming support
  • grpc-status and grpc-message in HTTP/2 trailers
  • Correct gRPC error handling

But with ALB in the path:

  • Streaming breaks — long-lived calls are prematurely closed
  • Status trailers are lost — client receives only 200 OK even on failure
  • Interceptors and retry logic in gRPC client fail silently

🔎 Example of Broken gRPC Call via ALB

Expected gRPC Response (over HTTP/2):

:status: 200
content-type: application/grpc
grpc-status: 5
grpc-message: Not Found

ALB Response (after downgrade):

HTTP/1.1 200 OK
content-type: application/grpc
(no grpc-status trailer!)

Result: gRPC client sees it as success (OK), even though the call failed on the server.


✅ Summary Table

FeatureHTTP/2 RequiredPassed via ALB (HTTP/1.1)Outcome
Unary gRPC Calls❌ Optional✅ YesMay work
gRPC Streaming (all types)✅ Yes❌ NoBroken
gRPC Trailers (grpc-status)✅ Yes❌ NoBroken
Metadata headers⚠️ Often required⚠️ IncompleteUnpredictable
Observability (otel/metrics)✅ Yes❌ IncompletePartial / broken

🔧 How to Prevent This

Use NLB + Envoy Gateway or a gRPC-aware ingress like:

  • Envoy Gateway with HTTP/2
  • Istio IngressGateway
  • Gateway API with GRPCRoute

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x