Skip to main content

Configure a private connection to an inference service via a cloud server

You can configure a private connection to an inference service via a cloud server. This will allow you to send requests directly to the model from the cloud server via a private endpoint within a private subnet.

To configure this, an inference service in private access mode is used. The cloud server you plan to connect from must be created in the same pool and the same private subnet as the inference service.

  1. Create a cloud server in the inference service private subnet.
  2. Send a test request to the model.

1. Create a cloud server in the inference service private subnet

  1. In the Control panel, on the top menu, click Products and select Cloud Servers.

  2. Click Create server.

  3. Fill in the blocks:

  4. Check the cloud server price. More details are available in the Cloud server payment model and prices.

  5. Click Create.

Name and placement

  1. Enter the server name. It will be set as the hostname in the operating system.

  2. Select the location where the server will be created. The server must be in the same pool as the inference service. You can view the inference service pool in the control panel: in the top menu, click ProductsInference Services → inference service card.

    The list of available server configurations and resource costs depend on the location. Once the server is created, you cannot change the location.

Source

You can create a server:

  1. Open the OS tab.

  2. Select an image. Ready-made images are available in all pool segments.

  3. If you are creating a server with a GPU, toggle on Auto-select GPU image to automatically select an optimized OS image when choosing a configuration.

  4. Optional: if you need a different current or archived OS version, select the required version in the Version field. OSs marked as GPU optimized contain the drivers necessary for working with graphics processors.

Configuration

Two types of server configurations are available for all lines except Shared and Dedicated:

  • fixed configurations — configurations from lines with different technical specifications where the resource ratio is fixed;
  • custom configurations — configurations in which any resource ratio can be specified.

Configurations use different processors depending on the line and pool segment. You can customize the selected configuration. After the server is created, you will be able to change the configuration.

  1. Open the tab with the line.

  2. Click Fixed.

  3. Optional: you can adjust the configuration if you are creating a server in a multi-zone pool segment ru-6 or pool segments ru-3b, ru-7a, and ru-7b:

    3.1. Expand the block with the configuration settings description.

    3.2. Optional: select a processor manufacturer. The choice of manufacturer is not available in all pools.

    3.3. Optional: if you do not want physical processor cores to be pinned to the cloud server vCPUs, uncheck the Dedicated Cores checkbox. More details in the Dedicated Cores.

    3.4. Optional: if you want to disable Hyper-Threading for a server with dedicated cores, uncheck the Hyper-Threading (SMT) checkbox.

    3.5. Optional: if you are creating a server with dedicated cores and want to host a multiprocessor server on a single NUMA node, check the Mandatory placement on a single NUMA node checkbox. You can host a server with 4 vCPUs or more on a single NUMA node. If the cloud server resources cannot be placed on one node, it will not be created. More details in the Placement on a single NUMA node subsection of the Dedicated Cores.

  4. Select a configuration.

  5. If both local and network volumes are available in the selected configuration, select the volume to be used as the boot volume:

    • local disk — check the Local SSD NVMe disk checkbox. A server with a local disk can only be created from images and applications;
    • network volume — do not check the Local SSD NVMe disk checkbox.

    The amount of RAM allocated to a server may be less than specified in the configuration — the operating system kernel reserves a portion of RAM depending on the kernel version and distribution. You can check the allocated volume on the server using the command sudo dmesg | grep Memory.

Volumes

  1. If you did not check the Local SSD NVMe disk checkbox when setting up the configuration, the first specified network volume will be used as the server boot volume. To configure it:

    1.1. Select the type of network boot volume.

    1.2. Specify the size of the network boot volume in GB or TB. Observe the maximum size limits for network volumes.

    1.3. If you chose the Universal v2 or Fast SSD v2 volume type, specify the total IOPS for read and write operations. Once the volume is created, you can change the IOPS — decrease or increase it. The number of IOPS changes is unlimited.

  2. Optional: to add additional network volumes to the server:

    2.1. Click Add.

    2.2. Select the type of network volume.

    2.3. Specify the network volume size in GB or TB. Observe the maximum size limits for network volumes.

    2.4. If you chose the Universal v2 or Fast SSD v2 volume type, specify the total IOPS for read and write operations. Once the volume is created, you can change the IOPS — decrease or increase it. The number of IOPS changes is unlimited.

    Once the server is created, you will be able to detach additional volumes from it or attach new ones.

Internet

Configure public access to the server.

The cloud server will be added to the inference service private subnet, which will be connected to a cloud router with 1:1 NAT and internet access. Internet access to and from the internet will be provided through the cloud router. The server will be accessible from the internet via a public floating IP address.

  1. In the Internet connection field, select the Public floating IP address access type.

  2. Select an available IP address or create a new one.

Private network

  1. In the Subnet field, select the private subnet of the inference service. The inference service subnet can be viewed in the control panel: in the top menu, click ProductsInference Services → inference service page → Quick Start tab → Connection block → Network.

  2. In the IP address field, enter a free IP address from the inference service subnet range. Three IP addresses in the subnet are reserved for service needs and cannot be assigned to other devices. These are usually the first IP addresses in the subnet range, for example: 172.16.0.1, 172.16.0.2, 172.16.0.3. If you receive an error about the IP address being taken when creating the server, try the next sequential IP address.

  3. Configure the connection to the cloud router. For a server with a public floating IP address, a router is required. For a server without internet access, a router is optional — it allows you to communicate with other private networks and access the internet, for example, for updates. At the same time, the server remains inaccessible from the internet.

    3.1. If you chose connection without internet access and do not need a router, select No router in the Router field;

    3.2. If you selected a connection without internet access and you need a router, select an existing router or create a new one in the Router field. To allow the server to access the internet through the router, select the Connect router to the internet;

    3.3. If you selected a connection to the internet via a public floating IP address, select an existing router or create a new one in the Router field. If the selected router is not connected to the internet, it will be automatically connected to the internet after the server is created.

Security

Select security groups to filter traffic on server ports. Without security groups, all traffic will be denied. If the block is missing, traffic filtering (port security) is disabled on the server network. With traffic filtering disabled, all traffic will be allowed.

Access

  1. Place an SSH key for the project on the server for secure connection:

    1.1. If an SSH key for the project has not been added to the cloud platform, click Add SSH key, enter the key name, paste the public key in OpenSSH format, and click Add.

    1.2. If an SSH key for the project has been added to the cloud platform, select an existing key in the SSH key field. An SSH key is only available in the pool where it is stored.

  2. Optional: in the Password for “root” field:

    2.1. Copy the password for the root user — the user with unrestricted privileges for all system actions.

    2.2. Save the password in a secure place and do not share it in plain text.

Optional: additional settings

  1. To create a preemptible server, check the Preemptible server checkbox.

  2. If you plan to create multiple servers and want to increase infrastructure fault tolerance, add the server to a placement group:

    2.1. To create a new group, select New group in the Placement group field, enter the group name, and select a placement policy on different hosts:

    • preferred — soft-anti-affinity. The system will try to place servers on different hosts. If there is no suitable host when creating the server, it will be created on the same host;
    • required — anti-affinity. Servers in a group are mandatory placed on different hosts. If there is no suitable host when creating the server, the server will not be created.

    2.4. If the group has been created, select it in the Placement group field.

  3. To add additional information or filter servers in the list, add server tags. Operating system and configuration tags are added automatically. To add a new tag, enter it in the Tags field.

  4. To add a script that will be executed using the cloud-init agent during the first operating system boot, in the Automation block in the User data field:

    • open the Text tab and paste the script as text;
    • or open the File tab and upload the file with the script.

    Script examples and supported formats can be found in the User data guide.

2. Send a test request to the model

  1. Connect to the cloud server via the console in the Control panel:

    1.1. In the Control panel, on the top menu, click Products and select Cloud Servers.

    1.2. In the server row, click .

    1.3. Enter the username (login). You can view it in the Login.

    1.4. Enter the password. You can view it in the Password.

  2. Send a test request to the model via the cloud server console.

    The request data structure depends on the model, API type, and request type. Test request examples for a model can be copied in the control panel: in the top menu, click ProductsInference Services → inference service page → Quick Start tab → in the Test Request block, select the API type, request type, and click .

    More details on request types and API types can be found in the tutorial Interaction modes with an inference service.