Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vwrs configuration section #1199

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

maryann-macrometa
Copy link
Collaborator

Revamped the waiting room page and added a detailed tutorial on uploading the waiting room page.

Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ❌ Failed (Inspect) Jul 9, 2024 11:12pm

Copy link
Contributor

@todor-macrometa todor-macrometa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably unrelated to VWRS but... deployment fails.

@todor-macrometa todor-macrometa dismissed their stale review July 10, 2024 06:42

Deployment fails

@todor-macrometa todor-macrometa self-requested a review July 10, 2024 06:42

- **Origin Service**: The website for which you want to set up a virtual waiting room.
- **Origin Metrics Service**: Allows you to retrieve information about a specific domain.
- **Waiting Room Page**: The endpoint (URL) with the waiting room attached.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont understand. An endpoint that has waiting room attached.
Is attached the right word?


## The VWR Workflow

During moments of peak traffic, VWRs makes a new page separate from your origin to organize visitors. The VWRs workflow ensures that users are directed to the appropriate origin service while ensuring fairness in the queue and providing metrics and alerts to the administrator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having "ensured" twice in a sentence sounds strange.

"... makes a new page separate from your origin to organize visitors" does not sound right. It does not "make" a page and "organize" is strange wording.

I ran this through chatgpt and it came up with this:

The VWRs workflow directs users to the correct origin service, maintains fairness in the queue, and provides metrics and alerts to the administrator.


During moments of peak traffic, VWRs makes a new page separate from your origin to organize visitors. The VWRs workflow ensures that users are directed to the appropriate origin service while ensuring fairness in the queue and providing metrics and alerts to the administrator.

1. The Akamai EdgeWorkers check the virtual room service to confirm if a waiting room is set up for an origin service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

virtual room service ?? Are we using this wording to describe vwrs?


1. The Akamai EdgeWorkers check the virtual room service to confirm if a waiting room is set up for an origin service

- If no waiting room, the EdgeWorker sends the traffic request directly to the origin service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it is "waiting room" and above it is "virtual room service"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that not be:

"if no waiting room is configured". or is it ok to just say "if no waiting room"?

1. The Akamai EdgeWorkers check the virtual room service to confirm if a waiting room is set up for an origin service

- If no waiting room, the EdgeWorker sends the traffic request directly to the origin service.
- If there is a waiting room, the EdgeWorker sends to the waiting room.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If there is a waiting room, the EdgeWorker sends to the waiting room.
- If there is a waiting room, the EdgeWorker sends to the waiting room service.


3. The waiting room service adds the request to the waiting room associated with the domain.
4. When a user accesses the waiting room page, the page polls the virtual waiting room service for the latest waiting time and waiting room depth and displays it.
6. When the waiting time is near zero, or the user is at the front of the queue, the waiting room page forwards the user to the origin service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
6. When the waiting time is near zero, or the user is at the front of the queue, the waiting room page forwards the user to the origin service.
6. When the waiting time is near zero, or the user is at the front of the queue, the waiting room service forwards the user to the origin service.


:::note

- The waiting room service periodically checks the sessions to remove requests for expired sessions from the queues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you remove "requests for expired sessions" or requests of expired sessions"?

:::note

- The waiting room service periodically checks the sessions to remove requests for expired sessions from the queues.
- The waiting room service periodically checks the sessions to remove requests for expired sessions from the queues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same as above.


- The waiting room service periodically checks the sessions to remove requests for expired sessions from the queues.
- The waiting room service periodically checks the sessions to remove requests for expired sessions from the queues.
- The waiting room service collects the metrics for each domain.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The waiting room service collects the metrics for each domain.
- The waiting room service collects the metrics for each waiting room.

- The waiting room service periodically checks the sessions to remove requests for expired sessions from the queues.
- The waiting room service periodically checks the sessions to remove requests for expired sessions from the queues.
- The waiting room service collects the metrics for each domain.
- The administrator can turn customer domains on or off through Configuration APIs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The administrator can turn customer domains on or off through Configuration APIs.
- The administrator can turn customer waiting rooms on or off through Configuration APIs.

- The waiting room service periodically checks the sessions to remove requests for expired sessions from the queues.
- The waiting room service collects the metrics for each domain.
- The administrator can turn customer domains on or off through Configuration APIs.
- VWR uses a queue to serve user requests based on join time. You can configure the queue to be FIFO, random, or lottery based.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this. This does not provide much help.


### Steps

To integrate your virtual waiting room with your web application:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we capitalize Virtual Waiting Room?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are times we have these capitalized, and other times they are not. I think we should be consistent throughout our documentation.

Once your virtual waiting room is operational, consider monitoring and managing its performance to ensure optimal functionality:

- **Metrics and Analytics:** Regularly check the [VWRs metrics](../05-monitoring-vwrs/index.md) to assess the performance and effectiveness of your waiting room.
- **Review Usage Patterns:** Analyze usage data to optimize settings and improve user experiences. You can customize your settings to analyze usage statistics at different time intervals:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that "... to analyze usage statistics" or "... by analyzing usage statistics"


The Macrometa PhotonIQ Virtual Waiting Room service (VWRs) offers extensive features to manage high-traffic volumes on websites and applications during peak periods like discounts and holiday sales. By implementing VWRs for their websites, businesses can ensure server stability, thus preventing server overload and potential downtime, ensuring service availability and user satisfaction.

PhotonIQ offers two ways to create and use your website's virtual waiting room service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PhotonIQ offers two ways to create and use your website's virtual waiting room service.
PhotonIQ offers two ways to create and manage your website's virtual waiting room service.

1. Click **Waiting Rooms** from the top nav bar.
1. Click **New Waiting Room**. This opens a pop-up section to enter the following details to set up your virtual waiting room.

- **waitingroom_name:** The name of the waiting room. Names should be without spaces. Replace spaces with hyphens or dashes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **waitingroom_name:** The name of the waiting room. Names should be without spaces. Replace spaces with hyphens or dashes.
- **waitingroom_name:** The name of the waiting room should not contain spaces.

- **waitingroom_url:** The URL that the waiting room needs to sit in front of. All subpaths of this URL are sent to this defined waiting room. For example, /checkout/path1 and /checkout/path2 are both sent to the /checkout waiting room
- **access_type:** The access type defines how the rate limit should be calculated. Different options include:
- **users:**
- The metric service counts the number of unique user requests every second. These are identified by a request ID stored in the encrypted cookie (vwrs-session).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- The metric service counts the number of unique user requests every second. These are identified by a request ID stored in the encrypted cookie (vwrs-session).
- The metric service counts the number of unique user requests every second. ```


# Overview

VWRs require [Akamai EdgeWorker Documentation](https://techdocs.akamai.com/edgeworkers/docs) to execute functions at the edge to help redirect and optimize web traffic for your websites. To get started using EdgeWorkers with VWRs, you need to import the `VirtualWaitingRoom` class from the photoniq-vwrs-client using Node Package Manager (NPM). This integrates the VWRs with the EdgeWorker.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need documentation to execute? I think you can remove documentation.


# Overview

VWRs require [Akamai EdgeWorker Documentation](https://techdocs.akamai.com/edgeworkers/docs) to execute functions at the edge to help redirect and optimize web traffic for your websites. To get started using EdgeWorkers with VWRs, you need to import the `VirtualWaitingRoom` class from the photoniq-vwrs-client using Node Package Manager (NPM). This integrates the VWRs with the EdgeWorker.
Copy link
Contributor

@joubert-macrometa joubert-macrometa Jul 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
VWRs require [Akamai EdgeWorker Documentation](https://techdocs.akamai.com/edgeworkers/docs) to execute functions at the edge to help redirect and optimize web traffic for your websites. To get started using EdgeWorkers with VWRs, you need to import the `VirtualWaitingRoom` class from the photoniq-vwrs-client using Node Package Manager (NPM). This integrates the VWRs with the EdgeWorker.
VWRs require [Akamai EdgeWorkers ](https://techdocs.akamai.com/edgeworkers/docs) to help redirect and optimize web traffic for your websites. To get started you need to import the `VirtualWaitingRoom` clas from the photoniq-vwrs-client using Node Package Manager (NPM). This integrates the VWRs with the EdgeWorker.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember, NPM is not being used.


### Step 1: Install the PhotonIQ VWRs Client

Before you can set up an EdgeWorker, you must install `@macrometa/photoniq-vwrs-client`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Naimish said that this is not what we support anymore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are going to need @naimishvora-macrometa to help us come up with the correct steps here.


## Entering the Waiting Room

- **Rate Limit:** Set the rate (maximum users per second) at which traffic should be diverted to the waiting room. (`rate_limit` property)
- **Waiting Room Path:** The URL that the waiting room needs to sit in front of. (`domain_url` property)
- **Waiting Room Path:** The URL that sits in front of the waiting room (`domain_url` property)
- **Queue Type:** Defines how requests should be removed from the waiting room, such as FIFO (first in, first out). (`queue_type` property)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just point out, here you have it as FIFO, but in other parts of the document you have it as "fifo", lower case. Lets keep it consistent throughout the document.

---

Below is a sample HTML template for a waiting room page. This page is displayed to users who are redirected to the waiting room. It's fully customizable to suit your needs. Within the template, the class attributes `queue-position`, `queue-depth`, and `avg-wait-time` are used to display the visitor's current position in the queue, the total number of users in the waiting room, and the average waiting time, respectively.
The VWRs waiting room page is a customizable HTML page that users see when they are directed to the waiting room. The waiting room page is hosted on the Akamai NetStorage and configured using the `waitingRoomPath` option in the VWRs EdgeWorker `handleVwrsRequest()` function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The VWRs waiting room page is a customizable HTML page that users see when they are directed to the waiting room. The waiting room page is hosted on the Akamai NetStorage and configured using the `waitingRoomPath` option in the VWRs EdgeWorker `handleVwrsRequest()` function.
The VWRs waiting room page is a customizable HTML page that users see when directed to the waiting room. It is hosted on Akamai's NetStorage and configured using the `waitingRoomPath` option in the VWRs EdgeWorker `handleVwrsRequest()` function.


## Configuring the Waiting Room Page

The waiting room path must be configured as a [Conditional Origin](https://techdocs.akamai.com/property-mgr/docs/conditional-origins) in Akamai's property manager. This allows the waiting room HTML page to be served from the Akamai NetStorage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The waiting room path must be configured as a [Conditional Origin](https://techdocs.akamai.com/property-mgr/docs/conditional-origins) in Akamai's property manager. This allows the waiting room HTML page to be served from the Akamai NetStorage.
The waiting room path must be configured as a [Conditional Origin](https://techdocs.akamai.com/property-mgr/docs/conditional-origins) in Akamai's property manager. This allows the waiting room HTML page to be served from the Akamai's NetStorage.

## Get Metrics

You can retrieve metrics using the following endpoints:
VWRs offers different endpoint for retrieving your waiting room metrics:

- [Get Metrics for a Domain](https://www.macrometa.com/docs/apiVwrs#/operations/getMetrics) - Retrieve the metrics for a specific domain. Set start and end times to get metrics for a specific time period. To get the domain key, use the [Get Information for All Domains](https://www.macrometa.com/docs/apiVwrs#/operations/getDomainUsingQueryParams) endpoint.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [Get Metrics for a Domain](https://www.macrometa.com/docs/apiVwrs#/operations/getMetrics) - Retrieve the metrics for a specific domain. Set start and end times to get metrics for a specific time period. To get the domain key, use the [Get Information for All Domains](https://www.macrometa.com/docs/apiVwrs#/operations/getDomainUsingQueryParams) endpoint.
- [Get Metrics for a Waiting Room](https://www.macrometa.com/docs/apiVwrs#/operations/getMetrics) - Retrieve the metrics for a specific waiting room. Set start and end times to get metrics for a specific time period. To get the waiting room key, use the [Get Information for All Waiting Rooms](https://www.macrometa.com/docs/apiVwrs#/operations/getDomainUsingQueryParams) endpoint.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@todor-macrometa is this URL correct? (https://www.macrometa.com/docs/apiVwrs#/operations/getDomainUsingQueryParams)
Did we keep this "Domain" or did we rename it to "WaitingRoom"?

Copy link
Contributor

@todor-macrometa todor-macrometa Jul 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maryann-macrometa @joubert-macrometa We did away with the domain terminology, and the changes are visible on the main branch and the docs site... but this branch is out-of-date.

The correct link is: https://www.macrometa.com/docs/apiVwrs#/operations/getWaitingRoomUsingQueryParams

## Get Metrics

You can retrieve metrics using the following endpoints:
VWRs offers different endpoint for retrieving your waiting room metrics:

- [Get Metrics for a Domain](https://www.macrometa.com/docs/apiVwrs#/operations/getMetrics) - Retrieve the metrics for a specific domain. Set start and end times to get metrics for a specific time period. To get the domain key, use the [Get Information for All Domains](https://www.macrometa.com/docs/apiVwrs#/operations/getDomainUsingQueryParams) endpoint.
- [Get All Metrics](https://www.macrometa.com/docs/apiVwrs#/operations/filterMetricsByDate) - Retrieve metrics for all domains. Set start and end times to get metrics for a specific time period.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [Get All Metrics](https://www.macrometa.com/docs/apiVwrs#/operations/filterMetricsByDate) - Retrieve metrics for all domains. Set start and end times to get metrics for a specific time period.
- [Get All Metrics](https://www.macrometa.com/docs/apiVwrs#/operations/filterMetricsByDate) - Retrieve metrics for all waiting rooms. Set start and end times to get metrics for a specific time period.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants