145 lines
8.7 KiB
ReStructuredText
145 lines
8.7 KiB
ReStructuredText
:original_name: waf_06_0027.html
|
|
|
|
.. _waf_06_0027:
|
|
|
|
Upgrading Dedicated WAF Instances
|
|
=================================
|
|
|
|
You can upgrade your dedicated WAF instances on the WAF console to obtain the latest protection performance. To ensure business availability during the upgrade, upgrade your dedicated WAF instances by following the procedure below.
|
|
|
|
.. important::
|
|
|
|
If your workloads have high reliability requirements, at least two dedicated WAF instances should be deployed in dual-active or multi-active architecture. A single dedicated WAF instance may cause single points of failure (SPOFs) once the ECS hosting it becomes faulty.
|
|
|
|
Prerequisites
|
|
-------------
|
|
|
|
You have connected the website to a dedicated WAF instance.
|
|
|
|
Upgrading a Single Dedicated WAF Instance
|
|
-----------------------------------------
|
|
|
|
If you have deployed only one dedicated WAF instance for your workloads, perform the following operations:
|
|
|
|
#. `Buy a dedicated WAF instance <https://support.huaweicloud.com/intl/en-us/usermanual-waf/waf_01_0248.html>`__.
|
|
|
|
- The new dedicated WAF instance is of the latest version. So its **Upgrade** button is grayed out.
|
|
- The VPC, subnet, security group, and other settings of the new instance must be the same as those of the original one. In this way, the new instance automatically synchronizes all WAF protection configurations of the original instance.
|
|
|
|
#. Run the curl command on any ECS in the VPC the original dedicated WAF instance locates to check whether the workloads are normal.
|
|
|
|
- HTTP workloads
|
|
|
|
**curl http://**\ *IP-address-of-the-dedicated-WAF-instance* **:**\ *Service-port* **-H "host:**\ *Service-domain-name*\ **" -H "User-Agent: Test"**
|
|
|
|
- HTTPS workloads
|
|
|
|
**curl https://**\ *IP-address-of-the-dedicated-WAF-instance* **:**\ *Service-port* **-H "host:**\ *Service-domain-name*\ **" -H "User-Agent: Test"**
|
|
|
|
Check whether the service is normal. If the service is normal, go to :ref:`Step 3 <waf_06_0027__li8786445165813>`. If the service is abnormal, fix the issue by referring to `Why Is the Access Status of a Domain Name Inaccessible? <https://support.huaweicloud.com/intl/en-us/waf_faq/waf_01_0278.html#section2>`__ and `How Do I Troubleshoot 404/502/504 Errors? <https://support.huaweicloud.com/intl/en-us/waf_faq/waf_01_0066.html>`__. After the fault is rectified, go to :ref:`Step 3 <waf_06_0027__li8786445165813>`.
|
|
|
|
.. note::
|
|
|
|
To run a curl command, your ECS must meet the following requirements:
|
|
|
|
- The network communication is normal.
|
|
- A curl command line tool has been installed. If you are using a Windows ECS, manually install a `curl <https://curl.haxx.se/>`__ command line tool on it. If you are a using a non-Windows ECS, no such action is required as the curl tool is installed automatically along with the operating system.
|
|
|
|
#. .. _waf_06_0027__li8786445165813:
|
|
|
|
Add the new dedicated WAF instance to the backend server group of the ELB load balancer you are using.
|
|
|
|
The following uses a shared load balancer to show how to add an instance to a backend server group.
|
|
|
|
a. Click |image1| in the upper left corner, select a region, and choose **Security & Compliance** > **Web Application Firewall** to go to the **Dashboard** page.
|
|
b. In the navigation pane on the left, choose **Instance Management** > **Dedicated Engine** to go to the dedicated WAF instance page.
|
|
c. Locate the row containing the WAF instance. In the **Operation** column, click **More** > **Add to ELB**.
|
|
d. In the **Add to ELB** dialog box, specify **ELB (Load Balancer)**, **ELB Listener**, and **Backend Server Group** you configure for the original dedicated instance.
|
|
e. Click **Confirm**. Then, configure service port for the WAF instance. In this example, configure **Backend Port** to the one we configured for the original dedicated instance.
|
|
|
|
#. On the ELB console, set the weight of the original dedicated instance to **0**. For details, see `Changing Backend Server Weights <https://support.huaweicloud.com/intl/en-us/usermanual-elb/elb_ug_hd3_0003_04.html>`__.
|
|
|
|
Requests are not forwarded to a backend server if its weight is set to 0.
|
|
|
|
#. Delete the original dedicated WAF instance during off-peak hours.
|
|
|
|
View the monitored metrics on Cloud Eye for the dedicated WAF instance, if there are less than five new connections, the traffic to the instance has decreased. For details, see `Viewing Metrics of a Dedicated WAF Instance <https://support.huaweicloud.com/intl/en-us/usermanual-waf/waf_01_0253.html#section2>`__.
|
|
|
|
a. Go to the **Dedicated Engine** page. :ref:`Figure 1 <waf_06_0027__waf_06_0027_en-us_topic_0257940801_fig7658182717546>` shows an example.
|
|
|
|
.. _waf_06_0027__waf_06_0027_en-us_topic_0257940801_fig7658182717546:
|
|
|
|
.. figure:: /_static/images/en-us_image_0000001206741713.png
|
|
:alt: **Figure 1** Accessing the dedicated engine page
|
|
|
|
**Figure 1** Accessing the dedicated engine page
|
|
|
|
b. In the row of the target instance, click **Delete** in the **Operation** column.
|
|
|
|
c. Click **OK**.
|
|
|
|
Resources on deleted instance are released and cannot be restored.
|
|
|
|
Upgrading Multiple Dedicated WAF Instances
|
|
------------------------------------------
|
|
|
|
If you have deployed multiple dedicated WAF instances for your workloads, perform the following steps to upgrade them:
|
|
|
|
#. .. _waf_06_0027__li19413161002313:
|
|
|
|
On the ELB console, obtain the weight of a dedicated instance and then change the weight to **0**. For details, see `Changing Backend Server Weights <https://support.huaweicloud.com/intl/en-us/usermanual-elb/elb_ug_hd3_0003_04.html>`__.
|
|
|
|
Requests are not forwarded to a backend server if its weight is set to 0.
|
|
|
|
#. Upgrade the dedicated WAF instance during off-peak hours.
|
|
|
|
View the monitored metrics on Cloud Eye for the dedicated WAF instance, if there are less than five new connections, the traffic to the instance has decreased. For details, see `Viewing Metrics of a Dedicated WAF Instance <https://support.huaweicloud.com/intl/en-us/usermanual-waf/waf_01_0253.html#section2>`__.
|
|
|
|
a. Go to the **Dedicated Engine** page. :ref:`Figure 2 <waf_06_0027__en-us_topic_0257940801_fig7658182717546>` shows an example.
|
|
|
|
.. _waf_06_0027__en-us_topic_0257940801_fig7658182717546:
|
|
|
|
.. figure:: /_static/images/en-us_image_0000001206741713.png
|
|
:alt: **Figure 2** Accessing the dedicated engine page
|
|
|
|
**Figure 2** Accessing the dedicated engine page
|
|
|
|
b. In the row containing the desired instance, click **Upgrade** in the **Operation** column.
|
|
|
|
c. Confirm the upgrade conditions and click **OK**.
|
|
|
|
It takes about 5 minutes for the upgrade to complete.
|
|
|
|
|
|
.. figure:: /_static/images/en-us_image_0000001569566562.png
|
|
:alt: **Figure 3** Upgrading the Edition of a Dedicated WAF Instance
|
|
|
|
**Figure 3** Upgrading the Edition of a Dedicated WAF Instance
|
|
|
|
#. Run the curl command on any ECS in the VPC the dedicated WAF instance locates to check whether the workloads are normal.
|
|
|
|
- HTTP workloads
|
|
|
|
**curl http://**\ *IP-address-of-the-dedicated-WAF-instance* **:**\ *Service-port* **-H "host:**\ *Service-domain-name*\ **" -H "User-Agent: Test"**
|
|
|
|
- HTTPS workloads
|
|
|
|
**curl https://**\ *IP-address-of-the-dedicated-WAF-instance* **:**\ *Service-port* **-H "host:**\ *Service-domain-name*\ **" -H "User-Agent: Test"**
|
|
|
|
Check whether the service is normal. If the service is normal, go to :ref:`Step 4 <waf_06_0027__li201167421444>`. If the service is abnormal, fix the issue by referring to `Why Is the Access Status of a Domain Name Inaccessible? <https://support.huaweicloud.com/intl/en-us/waf_faq/waf_01_0278.html#section2>`__ and `How Do I Troubleshoot 404/502/504 Errors? <https://support.huaweicloud.com/intl/en-us/waf_faq/waf_01_0066.html>`__. After the fault is rectified, go to :ref:`Step 4 <waf_06_0027__li201167421444>`.
|
|
|
|
.. note::
|
|
|
|
To run a curl command, your ECS must meet the following requirements:
|
|
|
|
- The network communication is normal.
|
|
- A curl command line tool has been installed. If you are using a Windows ECS, manually install a `curl <https://curl.haxx.se/>`__ command line tool on it. If you are a using a non-Windows ECS, no such action is required as the curl tool is installed automatically along with the operating system.
|
|
|
|
#. .. _waf_06_0027__li201167421444:
|
|
|
|
On the ELB console, change the weight of the dedicated instance from **0** to the one you obtain in :ref:`Step 1 <waf_06_0027__li19413161002313>`. For details, see `Configuring Weights for Backend Servers <https://support.huaweicloud.com/intl/en-us/usermanual-elb/elb_ug_hd3_0003_04.html>`__.
|
|
|
|
#. Upgrade other dedicated WAF instances one by one by referring to :ref:`Step 1 <waf_06_0027__li19413161002313>` to :ref:`Step 4 <waf_06_0027__li201167421444>`.
|
|
|
|
.. |image1| image:: /_static/images/en-us_image_0000001618384369.png
|