All Products
Search
Document Center

PrivateLink:What is PrivateLink?

Last Updated:Mar 21, 2024

PrivateLink is a service used to establish private, stable, and secure connections between virtual private clouds (VPCs) and other Alibaba Cloud services. PrivateLink simplifies network architectures and prevents risks that arise from service access over the Internet.

Introduction

PrivateLink allows mutual service access between Alibaba Cloud VPCs based on their connections. You can use PrivateLink to allow a VPC to access services in another VPC without the need to create Internet egresses such as NAT gateways and elastic IP addresses (EIPs). PrivateLink provides high data security and network quality because data is not transmitted over the Internet.

image.png

Scenarios

PrivateLink allows you to establish private, stable, and secure connections between endpoint services and VPCs in which endpoints are deployed. PrivateLink facilitates network configuration and meets the requirements of various scenarios.

Share cloud services across VPCs

You can use PrivateLink to enable a VPC to access a Server Load Balancer (SLB) instance that serves as the service resource in another VPC.

In the following figure, if you want VPC 1 to access the SLB instance in VPC 2 by using PrivateLink, you must specify the SLB instance as the service resource of the endpoint service in VPC 2, create an endpoint in VPC 1, and then connect the endpoint to the endpoint service in VPC 2.

跨地域访问终端节点服务

Share cloud services in a VPC with a data center

You can use PrivateLink to enable a data center to access an SLB instance that serves as the service resource in a VPC.

In the following figure, if you want the data center to access the SLB instance in VPC 2, you must share the SLB instance with VPC 1 by using PrivateLink, and connect VPC 1 with the data center by using an Express Connect circuit, a VPN gateway, or Smart Access Gateway (SAG).服务共享给本地数据中心

Terms

Before you use PrivateLink, we recommend that you learn about the terms that are described in the following table.

PrivateLink

Term

Description

endpoint

You can connect an endpoint to an endpoint service to establish a PrivateLink connection that allows a VPC to access external services. Endpoints are created and managed by service consumers.

endpoint elastic network interface (ENI)

Endpoint ENIs serve as ingresses for endpoints to access endpoint services.

endpoint security group

Security groups can control the traffic between VPCs and endpoint ENIs. Each endpoint must be added to at least one security group. After an endpoint is added to a security group, all ENIs of the endpoint are associated with the security group.

endpoint service

After you create an endpoint service in a VPC, you can use an endpoint that is deployed in another VPC to access the endpoint service. Endpoint services are created and managed by service providers.

service resource

You can use endpoints to access the service resources of endpoint services.

Note

You can specify SLB instances as service resources, including Classic Load Balancer (CLB), Application Load Balancer (ALB), and Network Load Balancer (NLB) instances.

service whitelist

The service whitelist of an endpoint service is used to manage users who are allowed to access the service resources.

After an endpoint service is created, the ID of the Alibaba Cloud account of the service owner is automatically added to the service whitelist. Users whose account IDs are in the whitelist can query the endpoint service and use endpoints to connect to the endpoint service. If you want to allow a VPC that belongs to another Alibaba Cloud account to access the endpoint service, you must add the ID of the Alibaba Cloud account to the service whitelist.

endpoint connection

You can establish an endpoint connection between an endpoint and an endpoint service.

Components

The following table describes the components of service consumers and service providers.

Entity

Component

Service consumer

  • Endpoint

  • Endpoint zone and ENI

  • Endpoint security group

Service provider

  • Endpoint service

  • Service resource

  • Service whitelist

  • Endpoint connection

You are not charged when you activate PrivateLink. After you activate PrivateLink, you are charged on a pay-as-you-go basis. Bills are generated on an hourly basis. You are charged an instance fee and a data transfer fee. For more information, see Billing.

Service consumers and service providers can use different Alibaba Cloud accounts. You can specify whether the service consumers or service providers to pay the bills. For more information, see the Payments section of the Billing topic.

Benefits

  • Low risks

    When you access endpoint services by using PrivateLink, requests are forwarded within Alibaba Cloud internal networks. This prevents risks that arise from service access over the Internet.

  • Independent network

    The networks of service providers and service consumers are independent of each other, which enhances network reliability.

  • Security

    When you use PrivateLink to access cloud services, you can add rules to the security group of the ENI that is used to access the services. This ensures higher security and fine-grained management.

  • Low latency and high quality

    When you use PrivateLink to access cloud services, requests are forwarded within the same zone to reduce network latency.

  • Simplified management

    PrivateLink allows you to access cloud services that are deployed in another VPC within the same account, or cloud services that belong to another account. This simplifies route and security configurations.

Differences between PrivateLink connections and VPC peering connections

Category

PrivateLink connection

VPC peering connection

Accessed resources

Only the service resources such as SLB instances and ECS instances of endpoint services can be accessed.

All resources in VPCs can be accessed.

Communication direction

One-way communication. Only VPCs where endpoints are deployed can access the resources of endpoint services.

Two-way communication between two VPCs that establish a peering connection.

CIDR overlap

In a PrivateLink connection, the CIDR blocks of the two VPCs can overlap with each other without affecting each other.

In a VPC peering connection, the CIDR blocks of the two VPCs cannot overlap with each other.

Route management

The system automatically configures routes for the two VPCs that establish a PrivateLink connection. You do not need to manually configure routes.

You need to manually add routes to the route tables of the two VPCs in a VPC peering connection to manage traffic. The custom routes point to the peer VPCs.

Access PrivateLink

You can access and manage PrivateLink in the following ways by using an Alibaba Cloud account:

  • VPC console: a web console that supports interactive operations. The VPC console allows you to access services in a VPC from another VPC.

  • Alibaba Cloud SDKs: supports multiple programming languages, such as Java, Go, PHP, Python, C#, and C++.

  • OpenAPI Explorer: allows you to retrieve and call API operations, and dynamically generates SDK sample code.