Akamai Agent
Overview
Seamlessly integrated with NetFUNNEL in the Akamai EdgeWorkers environment, the agent controls the queue in real time at the frontline where user requests originate.
Create EdgeWorker
- Click [EdgeWorkers] in the menu.
- Click [Create EdgeWorker ID].
- Enter the details and click [Create EdgeWorker ID] to create the EdgeWorker.
- Select the created EdgeWorker and click [Create version].
- Click [Open editor].
Upload Agent Code
- Prepare the agent file you downloaded.
- In the [Code Bundle] tab, select the main.js file and paste the contents of the agent file into it.
- Select the bundle.json file and create it with reference to the following code.
{
"edgeworker-version": "1.0.0",
"description" : "akamai-agent-1.0.0"
}
- Click [Create new version] to create the version.
Deploy EdgeWorker
- When creation is complete, click [Activate version].
- Select [Production] and click [Activate version] to deploy.
- When deployment is complete, Current Status becomes Complete.
Property Configuration
Create Property
If you already have a Property created, skip to the Property configuration step.
- Click [Properties] in the menu.
- Click [New Property].
- Click [Create Property].
- Click [Guide me].
- Enter the details and click the [Next] button.
- After confirming that the entered Hostname value is registered correctly, click the [Next] button.
- Enter STEP1.
- Enter the details, click the [Validate] button, and select the EDGE CERTIFICATE that matches your environment.
- Click [Continue], configure cache, then click [Next].
- Enter STEP2. Click [Next].
- Enter STEP3. Click [Activate].
- When complete, click [Next].
- Enter STEP4. Click [Next].
- Enter STEP5. Click [Exit] to complete Property creation.
Property Configuration
Select Property
- Click [Properties] in the menu.
- Select the Property you created.
- Select the version to edit. (Select the topmost version.)
Property Variables Configuration
- Add Property Variables with reference to the table below.
You can find CLIENT_ID in the NetFUNNEL console.
| VARIABLE NAME | INITIAL VALUE |
|---|---|
| NF_CLIENT_ID | CLIENT_ID |
Property Configuration Settings
Add EdgeWorker Rule
- In Property Configuration Settings, click [+Rules].
- Select [Blank Rule Template], enter NF EdgeWorker in the input field, then click [Insert Rule].
- In Criteria, click [+Match] and configure as follows:
- Path
- matches one of
- /*
- Click [+Match] and configure as follows:
- File Extension
- is not one of
- Select all extensions except html.
- To exclude fonts, video, audio, and document files, also add: woff, woff2, ttf, eot, otf, sfnt, svg, webp, avif, map, mp4, webm, ogg, ogv, flac, acc, docx, xls, xlsx, ppt, pptx, csv, xml, json
- In Behaviors, click [+Behavior] and select Standard property behavior.
- Select EdgeWorkers and click [Insert Behavior].
- In Identifier, select the EdgeWorker you created earlier.
Add Core Origin Rule
- In Property Configuration Settings, click [+Rules].
- Select [Blank Rule Template], enter NF Core Origin in the input field, then click [Insert Rule].
- In Criteria, click [+Match] and configure as follows:
- Path
- matches one of
- /ts.wseq
- In Behaviors, click [+Behavior] and select Standard property behavior.
- Select Origin Server and click [Insert Behavior].
- Configure with reference to the table below. (Set items not listed to their defaults.)
| Origin Type | Your Origin |
|---|---|
| Origin Server Hostname | {CLIENT_ID}.netfunnel.stclab.com e.g. stclab-0000.netfunnel.stclab.com |
| Forward Host Header | Origin Hostname |
| Cache Key Hostname | Origin Hostname |
Add Setting Origin Rule
- In Property Configuration Settings, click [+Rules].
- Select [Blank Rule Template], enter NF Setting Origin in the input field, then click [Insert Rule].
- In Criteria, click [+Match] and configure as follows:
- Path
- matches one of
- /
{CLIENT_ID}.netfunnel/nf-setting.json
- In Behaviors, click [+Behavior] and select Standard property behavior.
- Select Origin Server and click [Insert Behavior].
- Configure with reference to the table below. (Set items not listed to their defaults.)
| Origin Type | Your Origin |
|---|---|
| Origin Server Hostname | nf-setting-bucket.stclab.com |
| Forward Host Header | Origin Hostname |
| Cache Key Hostname | Origin Hostname |
Save and Activate Property
- Click the [Save] button at the bottom right.
- Click the [Activate] tab at the top, then click [
Activate {version} on Production] under Production Network. - When Verifying completes, check the box for the warning message at the top and click [
Activate {version} on Production]. - When the process finishes, Property activation is complete.
Additional Features
Good Bot Exception
When the User-Agent contains a Good Bot identifier keyword, the request is excluded from agent control.
Property Configuration
- Select the Property where the EdgeWorker is applied.
- In Property Configuration Settings, select NF EdgeWorker.
- In Criteria, click [+Match].
- Select User Agent, is not one of.
- Add the User-Agent of the good bots you want to exclude.
- Click the [Save] button at the bottom right.
- Click the [Activate] tab at the top, then click [
Activate {version} on Production] under Production Network. - When Verifying completes, check the box for the warning message at the top and click [
Activate {version} on Production].
Entry Key Auto-Return
The NetFUNNEL agent automatically returns the issued key after entry so the next user in line can enter. Use this feature when you want the key to be returned at the segment timeout instead of returning it immediately.
Property Configuration
- Select the Property where the EdgeWorker is applied.
- Add Property Variables with reference to the table below.
| VARIABLE NAME | INITIAL VALUE |
|---|---|
| NF_RETURN_KEY | true |
When set to true (default), the agent automatically returns the NetFUNNEL key when the user enters after waiting. When set to false, the key is returned at the timeout configured in the segment.
- Click the [Save] button at the bottom right.
- Click the [Activate] tab at the top, then click [
Activate {version} on Production] under Production Network. - When Verifying completes, check the box for the warning message at the top and click [
Activate {version} on Production].
Change Waiting Room Domain
The domain of the NetFUNNEL waiting room page is agent-lib.stclab.com. To change it to your service domain, request your desired domain and also add it to the configuration.
Property Configuration
- Select the Property where the EdgeWorker is applied.
- Add Property Variables with reference to the table below.
| VARIABLE NAME | INITIAL VALUE |
|---|---|
| NF_VWR_PAGE_DOMAIN | http(s)://{CNAME_DOMAIN} e.g. https://wait.stclab.com |
- Click the [Save] button at the bottom right.
- Click the [Activate] tab at the top, then click [
Activate {version} on Production] under Production Network. - When Verifying completes, check the box for the warning message at the top and click [
Activate {version} on Production].
Cookie Domain Configuration
The NetFUNNEL agent stores the issued key in cookies based on the current page domain after entry. To share keys across different subdomains, configure the main domain to be stored in the cookie.
Set to .stclab.com so that cookies are shared across pages with different subdomains, such as netfunnel.stclab.com and botmanager.stclab.com.
Property Configuration
- Select the Property where the EdgeWorker is applied.
- Add Property Variables with reference to the table below.
| VARIABLE NAME | INITIAL VALUE |
|---|---|
| NF_COOKIE_DOMAIN | .{MAIN_DOMAIN} e.g. .stclab.com |
- Click the [Save] button at the bottom right.
- Click the [Activate] tab at the top, then click [
Activate {version} on Production] under Production Network. - When Verifying completes, check the box for the warning message at the top and click [
Activate {version} on Production].