All Products
Search
Document Center

Platform For AI:Overview

Last Updated:Mar 18, 2024

Elastic Algorithm Service (EAS) of Platform for AI (PAI) provides the following methods to call services: Internet access, Virtual Private Cloud (VPC) access, and VPC direct connection. You can select a method based on your client network. This topic describes these call methods.

Method to call services

You can use one of the following methods to call EAS services:

  • Internet access

    You can access services deployed in resource groups over the Internet.

    When you use your client to access an online service over the Internet, an API gateway receives the request and then forwards the request to the service.

  • VPC access

    You can access services deployed in resource groups by using VPC connections. If your VPC and the VPC to which a service belongs reside in the same region, you can establish a connection between the VPCs.

  • VPC direct connection

    You can deploy a service or dedicated resource group in the VPC network to enable the VPC direct connection feature. After you enable the VPC direct connection feature, you can access services without the need to use gateways, Layer 4 load balancing, or Layer 7 forwarding. You can directly access services from your VPC. The built-in remote procedure call (RPC) technology of EAS supports HTTP protocol stacks. This significantly improves the performance and reduces the access latency of services that have high queries per second (QPS), such as image services.

    The VPC direct connection feature is implemented based on network connectivity and service discovery.

    • Network connectivity

      After you grant your Alibaba Cloud account the required permissions on EAS and enable the VPC direct connection feature, the system creates a free elastic network interface (ENI) for the vSwitch and security group that you specified. The ENI occupies IP addresses in the CIDR block of the vSwitch. Make sure that the vSwitch has sufficient idle IP addresses. EAS creates and associates an ENI for each instance in the resource group. This allows you to access the instances in the resource group from your VPC.

    • Service discovery

      After you deploy a service in a resource group, the system creates instances for the service based on the number of instances that you requested. The instances function as processes. The system assigns a port to each instance of the EAS service. You can access the service by using the assigned port and the IP address of the ENI used by a service instance. EAS provides the service discovery feature. You can periodically query or update the IP:PORT list of a service. For more information, see Call a service over the VPC direct connection channel.