Roles

A user must be assigned the admin application role to execute any of the examples described on this page.

Manage Compute Pool

Winning Variant creates its own compute pool that it uses to run its services in an isolated environment. The admin application role is granted the following permissions: OPERATE, MODIFY, USAGE, MONITOR . This means that an admin can alter the compute pool directly.
All services are designed to run on a single instance, so there’s no point in increasing the number of nodes in the compute pool as each service will still use just a single instance.

Manage Services

The Winning Variant services can be managed by an admin using the following stored procedures (all within the management schema):
ProcedureDescription
suspend_services()Suspends all services.
suspend_config_service()Suspends just the configuration service.
suspend_variant_service()Suspends just the variant service.
resume_services()Resumes all services.
resume_config_service()Resumes the configuration service.
resume_variant_service()Resumes the variant service.
get_service_status()Gets the status of all services.
get_service_endpoints()Shows ingress URLs for all services.
Examples
USE <application_name>;

-- Suspend all services
CALL management.suspend_services();

-- Check status of services
CALL management.get_service_status();

Configuration Properties

While certain components of the app are configurable directly via SQL (i.e., scaling a compute pool), other components may be configured indirectly.

Properties

PropertyDescriptionDefault
VARIANTAPI:CONFIG_REFRESH_SECONDSHow often (in seconds) to refresh the configuration in the Variant API from the underlying tables. The Variant API must be restarted for this to take effect.

Variant API instances are automatically updated with new configuration in real-time, however this exists as a safety fallback to ensure that configuration is fresh.
21600
(6 hours)
VARIANTAPI:CSV_ROTATE_SECONDSHow often (in seconds) for the assignment CSV cache to be rotated.1800
(30 minutes)

Set configuration property

To set a property, execute the following procedure:
CALL management.set_config_property('<property>', '<value>')
Example
-- Set the Variant API to refresh configuration every 5 minutes
CALL management.set_config_property('VARIANTAPI:CONFIG_REFRESH_SECONDS', '300')
All values are stored as strings. So even a number, such as 100 should be stored as '100'.

Get configuration properties

To see the current configuration properties, perform a SELECT from management.config_properties. Example
-- See all configuration properties
SELECT * FROM management.config_properties;