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:
Event Handlers for Bucket VTA
The bucket VTA includes the following event handlers.
GetBucket Event Handler
The GetBucket event handler retrieves the balance of the bucket account when the subscriber logs in.
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.
UpdateBehavingUsage Event Handler
The UpdateBehavingUsage event handler updates the bucket account with the usage from the behaving service.
ToMisbehaving Event Handler
The ToMisbehaving event handler changes the subscriber to misbehaving mode when the bucket has zero or negative balance.
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.

Subscriber Account
The subscriber account sets the initial balance of the account to 2147483648 and sets the initial status of the account to active.
Service Accounts
The service account has the following usage metric:
SAE Proxy Processor for Bucket VTA
The SAE proxy processor is set to enabled.
Actions for Bucket VTA
The bucket VTA includes the following actions:

GetBucketBalance Action
The GetBucketBalance action retrieves account balances.
CalcUsage Action
The CalcUsage action calculates usage in the service-tracking event by using the usage metric configured for the service.
UpdateBucketForBehaving Action
The UpdateBucketForBehaving action debits usage of the behaving service from the bucket account.
RefillBucketWithBehavingRate Action
The RefillBucketWithBehavingRate action refills the bucket with the behaving rate.
StartMisbehavingService Action
The StartMisbehavingService action starts the misbehaving service.
StopBehavingService Action
The StopBehavingService action stops the behaving service.

