Hyper Open Edge Cloud

How To Setup A CDN For Customer's Server With SDN

How To Setup A CDN For Customer's Server With SDN
  • Last Update:2022-03-17
  • Version:001
  • Language:en

How To Setup A CDN For Customer's Server With SDN


  1. Prerequisites
  2. Environment Test
  3. Install Rapid.Space SDN
  4. Verify Re6st IPv6 Address
  5. Listen to IPv6
  6.  Request Rapid.Space CDN
  7. Verify Frontend

Assume that you have a website served in France and want it to be accessed with less latency in China, you are here the right place to be. 

This tutorial teaches you how to install Rapid.Space SDN on your back-end server and have a Frontend (Rapid.Space) CDN in China (frontends outside of mainland China are available too). 


Environment Test

Download the python script:

# If your serve is not in mainland China:
$ wget https://handbook.rapid.space/rapidspace-HowTo.Setup.A.CDN.For.Customers.Server.With.SDN.script/Base_download -O firewall-test.py
# If your server is in Mainland China:
$ wget https://handbook.xunkongjian.cn/rapidspace-HowTo.Setup.A.CDN.For.Customers.Server.With.SDN.script/Base_download -O firewall-test.py

Run the script to verify the firewall environment: 

# sudo is mandatory,  and it has to run in python2 instead of python3
$ sudo python2 firewall-test.py

The output of the script is supposed to be all green and present the sentence: "Firewall is properly configured for re6st". In this case, you are ready to install Rapid.Space SDN (Re6st) on your server. If not, please check the firewall setting on your server. 

Install Rapid.Space SDN

Please follow How To Use SDN For A Single Server to install Re6st on your server. 

Note: the production SDN token can be only provided by Rapid.Space Team.

Verify Re6st IPv6 Address

The Re6st IPv6 address is on lo interface. You can access the server via this IP, such as ssh user@ipv6_address.


Listen to IPv6

Depending on the web server installed on your back-end server, the configurations for back-end to listen to Re6st IPv6 (in addition to IPv4) are various. 

To verify if the backend is listening to IPv6, you can run: 

$ sudo netstat -plnt

The similar expected output will be:

$ sudo ss -utanp -o state LISTENING | grep nginx
tcp     0        128              *       users:(("nginx",pid=58369,fd=10),("nginx",pid=58368,fd=10),("nginx",pid=58367,fd=10))
tcp     0        128               *       users:(("nginx",pid=58369,fd=8),("nginx",pid=58368,fd=8),("nginx",pid=58367,fd=8))
tcp     0        128        [ipv6_address]:443               [::]:*       users:(("nginx",pid=58369,fd=11),("nginx",pid=58368,fd=11),("nginx",pid=58367,fd=11))
tcp     0        128        [ipv6_address]:80                [::]:*       users:(("nginx",pid=58369,fd=9),("nginx",pid=58368,fd=9),("nginx",pid=58367,fd=9))

By this means,  you will be able to access the website via the IPv6 address already. 


Request Rapid.Space CDN

With an accessible IPv6 address, you can request a Rapid.Space CDN by following HowTo Use Free CDN Service

To obtain a production Rapid.Space CDN, you are supposed to ask Rapid.Space team for supporting and providing us with 

  • "Backend URL" : your service's IPv6 address in the form https://[XXXX:XXXX:XXXX:XXXX]:YYYY (YYYY is optional port if your service is listening on a special port). Please also indicate the protocol (https:// ,https://, etc.).
  • "Custom Domain": the domain you purchased (eg. www.rapid.space). You can get a default domain if you don't have a custom domain: https://softinstxxxxxx.host.xunkongjian.cn/ or https://softinstxxxxxx.host.vifib.net/ (depending if you asked a frontend in China)


Verify Frontend

The Frontend you get from Rapid.Space CDN requesting should be accessible for you. You can verify by open it in your favorite browser.