Example of a Bucket VTA

Overview of Bucket VTA Example

In this example each subscriber has a bucket account; that is, an account that is periodically measured and refilled depending on the usage of the account.

In this example, there are two bucket sizes:

  • Behaving bucket size—2 GB
  • Misbehaving bucket size—1 GB

The rate at which the buckets are refilled depends on usage. If the subscriber is staying within the behaving rate, the bucket account is refilled at the rate of 2 GB per week. If the subscriber is exceeding the behaving rate, the bucket account is refilled at the rate of 1 GB per week:

  • Behaving refill rate—3550 bps, or 2 GBs per 7 days
  • Misbehaving refill rate —1775 bps, or 1 GB per 7 days

Events for Bucket VTA

The bucket VTA example has the following events:

Image g015925.gif

Event Handlers for Bucket VTA

The bucket VTA includes the following event handlers.

Image g015926.gif

GetBucket Event Handler

The GetBucket event handler retrieves the balance of the bucket account when the subscriber logs in.

Image g015927.gif

RefillBucketWithBehavingRate Event Handler

The RefillBucketWithBehavingRate event handler refills the bucket with the behaving rate and starts the behaving service if the bucket account has a positive balance.

Image g015928.gif

UpdateBehavingUsage Event Handler

The UpdateBehavingUsage event handler updates the bucket account with the usage from the behaving service.

Image g015929.gif

ToMisbehaving Event Handler

The ToMisbehaving event handler changes the subscriber to misbehaving mode when the bucket has zero or negative balance.

Image g015930.gif

Database Engine Processor for Bucket VTA

The bucket VTA contains a database engine processor that is configured as follows.

Account Update Scripts

The database engine processor contains two account update scripts:

  • DebitBehavingUsage—Debits the usage of the behaving service from the bucket account and resets the balance of the bucket account based on the new balance.
  • RefillBucketWithBehavingRate—Refills the bucket account with the behaving rate. Image g015933.gif

Subscriber Account

The subscriber account sets the initial balance of the account to 2147483648 and sets the initial status of the account to active.

Image g015931.gif

Service Accounts

The service account has the following usage metric:

Image g015932.gif

SAE Proxy Processor for Bucket VTA

The SAE proxy processor is set to enabled.

Image g015934.gif

Actions for Bucket VTA

The bucket VTA includes the following actions:

Image g015935.gif

GetBucketBalance Action

The GetBucketBalance action retrieves account balances.

Image g015936.gif

CalcUsage Action

The CalcUsage action calculates usage in the service-tracking event by using the usage metric configured for the service.

Image g015937.gif

UpdateBucketForBehaving Action

The UpdateBucketForBehaving action debits usage of the behaving service from the bucket account.

Image g015938.gif

RefillBucketWithBehavingRate Action

The RefillBucketWithBehavingRate action refills the bucket with the behaving rate.

Image g015939.gif

StartMisbehavingService Action

The StartMisbehavingService action starts the misbehaving service.

Image g015940.gif

StopBehavingService Action

The StopBehavingService action stops the behaving service.

Image g015941.gif