aws-solutions / virtual-waiting-room-on-aws

Virtual Waiting Room on AWS solution helps absorb and control incoming user requests to your website during an unusually large burst of traffic, usually due to a large-scale event.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Token Expiry & Serving Counter Enhancement

tunlinphyo opened this issue · comments

Request
I'm seeking a method to invalidate a token before its designated expiration time.

My Store Features

  • Customers receive a token for a single checkout session.
  • After checkout, the token is cleared for the customer, requiring them to request a new queue number.
  • I aim to boost the serving counter based on the number of "Active Tokens". For instance, if the count of "Active Tokens" falls below 50, I want to automatically increase the serving count by 50.

Problem
Even after a token is cleared from a user, the VWR system continues to mark it as active due to the fixed expiration time.

Thank you @tunlinphyo for requesting this enhancement. Regarding your suggestion to invalidate a token before its designated expiration time, you can achieve that by using the /update_session private endpoint after the checkout logic. Session status is denoted by an integer (0 indicates active, 1 indicates completed, and -1 indicates abandoned). For more details on /update_session private API, refer to our developer guide here.

Thank you, @bassemwanis, for your kind response. I apologize for my lack of knowledge.