For an existing replica set ensures that there is a replica running and ready that is not an auto-scaling replica on a dedicated instance. If no such replica process is found, one is launched on a shared instance in an availability zone different from the one hosting the replica set's master instance. Once the non-auto-scaling replica is ready, the auto-scaling group's {@link AutoScalingGroup#minSize() minimum size} is reduced to 0 so that with no excess workload the auto-scaling group will terminate all auto-scaling group-managed instances.
Should a new shared instance be required for a new replica, its instance type is obtained from the one hosting the replica set's master process, silently assuming that it may already be on a shared set-up.
Webservice Type: | POST |
Output format: | json |
Mandatory query parameters: |
regionId, region where to set up the replica set, e.g., eu-west-1
replicaSetName, name of the replica set; used as the hostname to which the domain name is appended, as well as
for the database and RabbitMQ exchange name
privateKeyEncryptionPassphrase, the pass phrase to decrypt the private key for the key specified by the keyName parameter
|
Optional form parameters: |
keyName, the name of the SSH key to use; must identify an existing SSH key by that name in the region specified
and will be used to log on to existing and new instances using a root ssh connection. If not specified, the
key used to launch an instance will be used for trying to connect to it, and a private key with matching name
for the respective region will be looked up.
replicaReplicationBearerToken, the bearer token the replica to launch on a shared instance will use to replicate its master server; defaults to the
bearer token of the user authenticated for this request. Note that this requires the
server processing this request to share the security information from security-service.sapsailing.com, too.
sharedInstanceType, instance type to use in the hyperscaler for a new shared replica instance. Defaults to the instance type of
the instance hosting the replica set's master process.
memoryInMegabytes, can be used to specify the absolute amount of heap size used for the Java VM running the replica on the shared instance;
if not specified, memoryTotalSizeFactor may be used (see below); if that isn't used either, heap size
is computed based on the amount of memory available on the instance, not considering any swap space available.
memoryTotalSizeFactor, can be used if memoryInMegabytes is not used; it roughly specifies how many processes are intended to be run on the
host; e.g., if 4 is specified, approximately 1/4 of the physical memory available (not considering swap space) is
assigned as the process's heap space. If neither memoryInMegabytes nor memoryTotalSizeFactor are specified then
the amount of memory is calculated automatically based on the amount of physical memory available on the host.
timeoutInMilliseconds, timeout in milliseconds to wait for responses from nodes when analyzing the replica sets
existing in the region; if not specified, a typical default for waiting for process responses will be used.
|
Request method: | POST |
Example: | curl -X POST -d 'regionId=eu-west-2' -d 'replicaSetName=mynewevent' -d 'keyName=Horst' --data-urlencode 'privateKeyEncryptionPassphrase=HorstsSuperSecretPassword' -H 'Authorization: Bearer RwGK+DV38LKjeuDu+Bx87/3blLJHD7Ff+NCLeud9nRQ=' "https://sapsailing.com/sailinglandscape/api/landscape/usesinglesharedinsteadofdedicatedautoscalingreplica"
produces output: { "name": "mynewevent", "version": "build-202112151552" } |