OpenResty Edge manages gateway configuration with built-in version control: every change stays pending until you make a config release, which pushes it to all gateway clusters at once with no reload, restart, or binary upgrade. Before releasing, you can preview the change as a text or JSON diff, ship it as a Normal or Staging release, and later revert or roll back to any earlier version in one click.

This tutorial walks through the full workflow: create a page rule, release it, modify and re-release it, then revert the latest release and roll back to an earlier one—each step verified with a curl test. The web console’s relational database provides the version control underneath.

Create a page rule for the sample application

OpenResty Edge configuration releases banner

As always, let’s go to the OpenResty Edge’s Admin web console. This is our sample deployment of the console. Every user has her own local deployment.

We still use our continuing sample application for the test-edge.com domain.

OpenResty Edge Admin console applications list for test-edge.com

Enter the application.

Application dashboard in the OpenResty Edge console

First we add a simple page rule to output a custom response body.

Page rules page for the sample application

Create a new page rule.

New page rule form with no condition set

We do not specify a condition for this rule. So it will fire unconditionally.

Adding an action to the page rule

Add a new action for returning a response directly.

Action type selector in the page rule editor

We can search for the “Output response body” action.

Searching for the Output response body action

Output response body action in the search results

Select it.

Selecting the Output response body action

Here we specify the “text/plain” Content-Type header.

Setting the text/plain Content-Type header on the response

And specify the “Hello world” response body.

Entering the Hello world response body

We need to make sure that this rule always runs before other rules. Let’s mark it as an Always-Top rule.

Marking the page rule as an Always-Top rule

We skip any subsequent rules if this rule is matched.

Enabling skip of subsequent rules when this rule matches

And then create it.

Creating the new page rule

We can see our page rule is already listed here.

New page rule listed as a pending change

Release the page rule to all gateway clusters

Our new page rule is not online yet since it is still a pending change.

We can push it out by making a new configuration release.

Pending changes on the configuration Releases page

We could use this Clear button if we want to clear any pending changes. We don’t want to clear it now.

Clear button for discarding pending changes

Before making a config release, we can check out the details of the pending changes.

Just click this button to check out the diff for the change.

Button to view the diff of the pending change

We provide a readable textual description for the changes.

Pending change shown as a readable textual description

And also the changes in the JSON format.

Pending change shown as a JSON diff

Let’s can make the new release now.

Starting a new configuration release

You have an option to release to your own staging gateway nodes only.

Option to release only to staging gateway nodes

In that case, this config release will have the type “Staging”. We’ll demonstrate this in a future video tutorial. Otherwise it will be of the type “Normal”.

Releasing configuration to staging gateway nodes only

Add some notes or comments here to describe the release. This is optional though.

Adding optional notes to describe the release

Then ship it by clicking on the Release button.

Clicking the Release button to ship the change

It is fully synchronized now.

Configuration release fully synchronized to the gateways

Now the new page rule has been pushed to all the gateway clusters and servers.

Our configuration changes do NOT require server reload, restart, or binary upgrade. So it’s very efficient and scalable.

Configuration synchronized to all gateway clusters without a reload

Test the released config with curl

Then on the terminal, we can send a test request to our application.

curl http://test-edge.com/

The test-edge.com domain is already resolved to our gateway node servers managed by OpenResty Edge.

Terminal ready to send a curl request to test-edge.com

Run it.

curl returning the Hello world response body

We indeed got the “Hello world” response body.

Back to the Releases page, we can browse all the release history in this table.

Release history table on the Releases page

Here we can see who authored each release.

Release history showing the author of each release

And also what time the release was made.

Release history showing the time of each release

You can check out the operation type, which can be either a “Release” or a “Rollback”.

Operation type column showing Release or Rollback

The Release type can be either a Normal one or Staging one.

Release type column showing Normal or Staging

We also can expand the details of each historical release here.

Expanding the details of a historical release

It still has the textual description.

Textual description shown for a historical release

Modify the page rule

Let’s edit our new page rule a bit. Go back to the page rules page.

Page rules page to edit the existing rule

Edit this rule.

Editing the existing page rule

Let’s change the response body to “Happy hacking!”

Changing the response body to Happy hacking

Save it.

We now have a new pending change again.

Release the modified config

New pending change on the Releases page after the edit

Make another new config release.

Starting another configuration release

Check the details of the pending change again.

Diff of the pending change before release

It shows that we replaced the “Hello world” message with “Happy hacking”.

Diff showing Hello world replaced with Happy hacking

Let’s release this pending change.

Releasing the modified configuration

This time we add a comment “Say happy hacking”.

Adding the comment Say happy hacking to the release

Ship it.

Shipping the modified configuration release

A new release is pushed out.

New release pushed out to the gateways

The release history is also updated.

Release history updated with the new release

Test the modified config

Let’s send a test request on the terminal again.

curl http://test-edge.com/

Terminal ready to send another curl request to test-edge.com

Run it.

curl returning the Happy hacking response body

The response body is indeed changed to “Happy hacking”.

Revert the latest config release

Next, say, we want to revert the latest config release.

Latest release selected in the release history

Just click on this “Revert this release” button.

Revert this release button on the latest release

Confirm to revert.

Confirmation dialog to revert the release

The release revert is now pushed out to all the gateway servers.

Release revert pushed out to all gateway servers

Now you see the latest Operation log has the type “Rollback”.

Operation log entry with the type Rollback

Test the reverted config

We test it out again on the terminal.

curl http://test-edge.com/

Terminal ready to send a curl request after the revert

Run it.

curl returning the Hello world response body again

It indeed turns back to “Hello world” now.

Roll back to any earlier release

We can rollback to an even older release, not just undo the last one.

Say, we want to rollback to the second last release this time.

Selecting the second-to-last release in the history

We could just click on this “Rollback to this release” button. Feel free to try it out yourself.

Rollback to this release button on an earlier release

This is what I’d like to cover today.

Release history after rolling back to an earlier release

Frequently asked questions

How do I release a configuration change in OpenResty Edge?

Any change you make in the web console—such as a new page rule—stays a pending change until you make a config release. On the Releases page, review the pending diff, optionally add a description, and click Release. The change is then pushed to all gateway clusters and servers.

Does releasing a config change require a server reload or restart?

No. Configuration releases in OpenResty Edge do not require a server reload, restart, or binary upgrade. The new configuration is synchronized to every gateway cluster and server automatically, which keeps releases efficient and scalable.

What is the difference between a Normal and a Staging release?

A Staging release ships the configuration only to your own staging gateway nodes, so you can verify a change before it goes live. A Normal release pushes it to all gateway servers. The release history labels each entry with its type so you can tell them apart.

How do I revert the latest release?

Open the latest entry in the release history and click “Revert this release”, then confirm. The revert is pushed out to all gateway servers immediately, and the operation is recorded in the history with the type “Rollback”.

Can I roll back to any earlier release, not just the last one?

Yes. Besides reverting the most recent release, you can pick any older entry in the release history—for example the second-to-last one—and click “Rollback to this release” to restore that exact configuration version.

Can I preview a change before releasing it?

Yes. Before making a release you can check the pending change as a human-readable textual description and as a JSON diff, so you can review exactly what will be pushed to the gateways.

What is OpenResty Edge

OpenResty Edge is our all-in-one gateway software for microservices and distributed traffic architectures. It combines traffic management, private CDN construction, API gateway, security, and more to help you easily build, manage, and protect modern applications. OpenResty Edge delivers industry-leading performance and scalability to meet the demanding needs of high concurrency, high load scenarios. It supports scheduling containerized application traffic such as K8s and manages massive domains, making it easy to meet the needs of large websites and complex applications.

If you like this tutorial, please subscribe to this blog site and/or our YouTube channel. Thank you!

About The Author

Yichun Zhang (Github handle: agentzh), is the original creator of the OpenResty® open-source project and the CEO of OpenResty Inc..

Yichun is one of the earliest advocates and leaders of “open-source technology”. He worked at many internationally renowned tech companies, such as Cloudflare, Yahoo!. He is a pioneer of “edge computing”, “dynamic tracing” and “machine coding”, with over 22 years of programming and 16 years of open source experience. Yichun is well-known in the open-source space as the project leader of OpenResty®, adopted by more than 40 million global website domains.

OpenResty Inc., the enterprise software start-up founded by Yichun in 2017, has customers from some of the biggest companies in the world. Its flagship product, OpenResty XRay, is a non-invasive profiling and troubleshooting tool that significantly enhances and utilizes dynamic tracing technology. And its OpenResty Edge product is a powerful distributed traffic management and private CDN software product.

As an avid open-source contributor, Yichun has contributed more than a million lines of code to numerous open-source projects, including Linux kernel, Nginx, LuaJIT, GDB, SystemTap, LLVM, Perl, etc. He has also authored more than 60 open-source software libraries.