Cloudflare
9 min read

Go and enhance your calm: demolishing an HTTP/2 interop problem

Read Full Article

Summary

The article discusses a critical issue encountered in a microservices architecture using HTTP/2, specifically related to the ErrCode=ENHANCE_YOUR_CALM error triggered by PING flood attacks. It details how a misconfiguration in a Go client led to excessive PING frames being sent, causing Cloudflare's defenses to close the connection. The authors provide insights into the HTTP/2 protocol's features, the importance of reading response bodies, and strategies for debugging such issues. The article emphasizes the need for developers to understand the implications of HTTP/2 features and to implement best practices to avoid similar pitfalls.

Key Learnings

  • 1Understanding the nuances of HTTP/2 features is crucial to avoid triggering denial-of-service mitigations.
  • 2Always read HTTP response bodies in Go to prevent unnecessary PING and RST_STREAM frames that can lead to connection closures.
  • 3Utilizing packet captures and detailed logging can help diagnose and resolve interop issues effectively.
  • 4The design of microservices should consider the implications of using edge services like Cloudflare for internal communication.
  • 5Dogfooding internal services can provide valuable insights that improve customer-facing products.

Who Should Read This

Senior Backend Engineers with experience in Go and microservices architecture facing HTTP/2 communication challenges

Test Your Knowledge

?

What are the potential consequences of not monitoring HTTP/2 feature usage in a microservices architecture?

?

How does the PING frame in HTTP/2 contribute to potential denial-of-service vulnerabilities?

?

What design decisions should be made to ensure efficient communication between microservices using HTTP/2?

?

Why is it important to read the response body in Go, and what are the implications of neglecting this step?

?

In what scenarios might excessive RST_STREAM frames be generated, and how can they be mitigated?

Topics

Read Full Article at Cloudflare