← Back
Tutorial

How to Enable Sticky Cookies in OpenResty Edge (Session Affinity)

  • How sticky cookies keep session affinity in OpenResty Edge
  • Enable sticky cookies for an upstream (server-level)
  • Test that every request hits the same backend
  • Disable sticky cookies and return to round robin
  • Test again and watch traffic spread across backends
  • Frequently asked questions
  • How sticky cookies keep session affinity in OpenResty Edge
  • Enable sticky cookies for an upstream (server-level)
  • Test that every request hits the same backend
  • Disable sticky cookies and return to round robin
  • Test again and watch traffic spread across backends
  • Frequently asked questions

How to Manage Kubernetes Upstreams in OpenResty Edge as Pods Scale

  • How to create and use Kubernetes upstream
    • Create Kubernetes cluster
    • Create Kubernetes upstream
    • Create a page rule that uses Kubernetes upstream
    • Test: scale the pods and watch the upstream auto-update
  • How to create and use Kubernetes upstream
    • Create Kubernetes cluster
    • Create Kubernetes upstream
    • Create a page rule that uses Kubernetes upstream
    • Test: scale the pods and watch the upstream auto-update

How to deploy the on-premises version of OpenResty XRay on Microsoft's Azure cloud

  • Create a subscription and a resource group
  • Create the Azure Kubernetes service
  • Prepare the environment variables
  • Log in to Azure from the command line
  • Create the namespace and secret for Kubernetes
  • Create the Azure Disk
  • Update the configuration file for the persistent volume
  • Update the Kubernetes configuration file
  • Create the persistent volume
  • Deploy the Kubernetes service
  • Configure the application gateway
  • Create a subscription and a resource group
  • Create the Azure Kubernetes service
  • Prepare the environment variables
  • Log in to Azure from the command line
  • Create the namespace and secret for Kubernetes
  • Create the Azure Disk
  • Update the configuration file for the persistent volume
  • Update the Kubernetes configuration file
  • Create the persistent volume
  • Deploy the Kubernetes service
  • Configure the application gateway

OpenResty Edge gRPC Proxy: Distributed Reverse Proxy & Load Balancer with TLS Termination

  • Prepare a sample gRPC server and test it with grpcurl
  • Add the gRPC server as an upstream and enable the gRPC proxy in a page rule
  • Terminate TLS at the gateway and verify the gRPC proxy end to end
  • Prepare a sample gRPC server and test it with grpcurl
  • Add the gRPC server as an upstream and enable the gRPC proxy in a page rule
  • Terminate TLS at the gateway and verify the gRPC proxy end to end

OpenResty Edge WAF: Enable, Test, and Block Attacks

  • Enable the WAF for an Application in Log-Only Mode
  • Send a Test Attack and Review the WAF Logs
  • Disable and Re-enable Individual WAF Rules
  • Add a WAF Whitelist to Save CPU Cycles
  • Return 403 on a WAF Hit: Sensitivity and Risk-Score Thresholds
  • Verify the 403 Block in the WAF Logs
  • Create Your Own WAF Rule Set in EdgeLang
  • FAQ: WAF on OpenResty
  • Enable the WAF for an Application in Log-Only Mode
  • Send a Test Attack and Review the WAF Logs
  • Disable and Re-enable Individual WAF Rules
  • Add a WAF Whitelist to Save CPU Cycles
  • Return 403 on a WAF Hit: Sensitivity and Risk-Score Thresholds
  • Verify the 403 Block in the WAF Logs
  • Create Your Own WAF Rule Set in EdgeLang
  • FAQ: WAF on OpenResty

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