All Products
Search
Document Center

Platform For AI:Overview

Last Updated:Aug 28, 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

image

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

  • Internet access

    You can access a service deployed in a resource group over the Internet.

    When you access an online service over the Internet, the EAS shared Internet gateway receives the request and then forwards the request to the service. To implement isolation or access control, you can use a dedicated gateway. The dedicated gateway can forward requests to the service, ensuring stable connection between the client and the service.

  • VPC access

    • You can access a service by using a shared gateway or a dedicated gateway if your VPC and the VPC to which the service belongs reside in the same region.

    • You can connect two VPCs that reside in different regions by using Cloud Enterprise Network (CEN). After the two VPCs are connected, you need to configure a dedicated gateway. The dedicated gateway can forward requests to the service, improving network bandwidth and reducing risks in scenarios with high concurrency and high throughout.

  • 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 a VPC direct connection.