← Back
Tutorial

EdgeLang Tutorial: How to Write Gateway & WAF Rules in OpenResty Edge

  • How EdgeLang Compiles Rules for Speed
  • How to Write an EdgeLang Page Rule (URL Redirect Example)
  • Test the EdgeLang Rule with curl
  • Modify an EdgeLang Rule: Exact vs. Prefix Match
  • How to Write WAF Rules in EdgeLang
  • EdgeLang User Manual and More Examples
  • FAQ
  • How EdgeLang Compiles Rules for Speed
  • How to Write an EdgeLang Page Rule (URL Redirect Example)
  • Test the EdgeLang Rule with curl
  • Modify an EdgeLang Rule: Exact vs. Prefix Match
  • How to Write WAF Rules in EdgeLang
  • EdgeLang User Manual and More Examples
  • FAQ

Nginx High CPU Usage: Find Which Requests Consume the Most CPU

  • Prerequisites and Environment Setup
  • Find Which Request Hostname Uses the Most CPU
  • Find Which Request URI Uses the Most CPU
  • Digging Deeper: Why Some Hostnames Use More CPU
  • Running the Tools in the Web Console
  • Tracing Nginx CPU Usage Inside Containers
  • How the CPU Profiling Tools Work
  • The Overhead of the Profiling Tools
  • Frequently Asked Questions
Photo by Yichun Zhang
  • Prerequisites and Environment Setup
  • Find Which Request Hostname Uses the Most CPU
  • Find Which Request URI Uses the Most CPU
  • Digging Deeper: Why Some Hostnames Use More CPU
  • Running the Tools in the Web Console
  • Tracing Nginx CPU Usage Inside Containers
  • How the CPU Profiling Tools Work
  • The Overhead of the Profiling Tools
  • Frequently Asked Questions

Configure HTTP Basic Auth in OpenResty Edge — No Server Reload or Restart

  • Configure the HTTP basic auth credentials for applications
    • Add a basic auth user group
    • Enable basic auth with a page rule
    • Test basic auth in a browser and with curl
  • Configure global HTTP basic auth across all applications
    • Add a global basic auth user group
    • Configure the global auth for application
Photo by Yichun Zhang
  • Configure the HTTP basic auth credentials for applications
    • Add a basic auth user group
    • Enable basic auth with a page rule
    • Test basic auth in a browser and with curl
  • Configure global HTTP basic auth across all applications
    • Add a global basic auth user group
    • Configure the global auth for application

How to Release and Roll Back Gateway Config in OpenResty Edge: Version Control Without Reload

  • Create a page rule for the sample application
  • Release the page rule to all gateway clusters
  • Test the released config with curl
  • Modify the page rule
  • Release the modified config
  • Test the modified config
  • Revert the latest config release
  • Test the reverted config
  • Roll back to any earlier release
Photo by Yichun Zhang
  • Create a page rule for the sample application
  • Release the page rule to all gateway clusters
  • Test the released config with curl
  • Modify the page rule
  • Release the modified config
  • Test the modified config
  • Revert the latest config release
  • Test the reverted config
  • Roll back to any earlier release

Redirect Based on Browser Language in OpenResty Edge: Accept-Language Page Rule

  • Redirect based on browser language with an Accept-Language page rule
  • Match the root URI and the Accept-Language header with a regex
  • Test the French redirect with curl
  • Add a fallback rule that redirects other languages to English
  • Ship changes to every gateway node with no Nginx reload
Photo by Yichun Zhang
  • Redirect based on browser language with an Accept-Language page rule
  • Match the root URI and the Accept-Language header with a regex
  • Test the French redirect with curl
  • Add a fallback rule that redirects other languages to English
  • Ship changes to every gateway node with no Nginx reload

Upload SSL Certificates for HTTPS Sites in OpenResty Edge

  • Upload the SSL certificate and private key in the Edge console
  • Push the new certificate without a server reload or restart
  • Test the uploaded certificate with curl –resolve
Photo by Yichun Zhang
  • Upload the SSL certificate and private key in the Edge console
  • Push the new certificate without a server reload or restart
  • Test the uploaded certificate with curl –resolve

How to Run a Real-Time Cache Purge Network-Wide in OpenResty Edge

  • Create a real-time cache purge job in OpenResty Edge
  • Verify the cache status with the Cache-Status header
  • Purge cache across the whole network with no reload
  • Purge cache by URL prefix
  • Custom purge conditions
  • FAQ
Photo by Yichun Zhang
  • Create a real-time cache purge job in OpenResty Edge
  • Verify the cache status with the Cache-Status header
  • Purge cache across the whole network with no reload
  • Purge cache by URL prefix
  • Custom purge conditions
  • FAQ

Enable HTTP Cache in OpenResty Edge: Proxy Cache Without Cache-Control Headers

  • Enable proxy cache in a page rule and set the cache key
  • Test the cache and verify Cache-Status HIT/MISS with curl
  • Enforce caching without a Cache-Control header
  • Frequently asked questions
Photo by Yichun Zhang
  • Enable proxy cache in a page rule and set the cache key
  • Test the cache and verify Cache-Status HIT/MISS with curl
  • Enforce caching without a Cache-Control header
  • Frequently asked questions

How to Set Up a Simple Reverse Proxy and Load Balancer with OpenResty Edge

  • Set up an OpenResty Edge reverse proxy and load balancer from the web console
  • Create an application and an upstream for your backend
  • Add a round-robin page rule
  • Release the config to every gateway node and verify with curl
Photo by Yichun Zhang
  • Set up an OpenResty Edge reverse proxy and load balancer from the web console
  • Create an application and an upstream for your backend
  • Add a round-robin page rule
  • Release the config to every gateway node and verify with curl
Contact us

Love to hear from you, Get in touch 👋

Message was sent successfully!

Our Team will get back to you within 24 hours.
x