Simple application servers are automatically assigned to virtual private clouds (VPCs) for network isolation. By default, simple application servers are not interconnected with other Alibaba Cloud services that reside in VPCs, such as Elastic Compute Service (ECS) and ApsaraDB. The service interconnection feature allows simple application servers to interconnect with other Alibaba Cloud services over VPCs. This topic describes how to enable the service interconnection feature and then manage VPCs.
The Simple Application Server console supports the service interconnection feature only for services that belong to the same Alibaba Cloud account and reside in the same region. In this case, the service interconnection feature is free of charge. If you want to enable the service interconnection feature for services across Alibaba Cloud accounts or regions, you must perform relevant operations in the Cloud Enterprise Network (CEN) console. In this case, you are charged for the service interconnection feature. For more information, see Billing rules, the "Grant Account B permissions on the VPC" section of the Grant a transit router permissions on a network instance that belongs to another Alibaba Cloud account topic, and Manage inter-region connections.
Scenarios
By default, all simple application servers that belong to the same Alibaba Cloud account and reside in the same region can communicate with each other. The service interconnection feature is mainly used in the following scenarios:
Simple application servers require access to ECS instances over VPCs.
Simple application servers require access to ApsaraDB databases over VPCs.
By default, simple application servers and Object Storage Service (OSS) buckets that reside in the same region can communicate with each other over VPCs. In this case, you do not need to enable service interconnection. For more information, see Implement service interconnection over the internal endpoint of an OSS resource.
The following figure shows a sample scenario. An enterprise purchases two VPCs in the China (Hangzhou) region and deploys simple application servers in VPC 1 and ECS instances in VPC 2. The enterprise wants to build connections between the simple application servers and the ECS instances across the VPCs.
Limits
The following limits apply to simple application servers that belong to the same Alibaba Cloud account:
All simple application servers in the same region are automatically assigned to the same VPC. The VPC can be added to only one CEN instance.
Simple application servers in different regions are added to region-specific VPCs. You must separately enable service interconnection for each region in the Simple Application Server console.
Operations performed in the CEN console are not synchronized to the Simple Application Server console. After you enable the service interconnection feature, we recommend that you perform operations, such as managing VPCs, in the Simple Application Server console. For more information, see the Add or remove a VPC section of this topic.
Billing
The Simple Application Server console supports the service interconnection feature only for services that belong to the same Alibaba Cloud account and reside in the same region. In this case, the service interconnection feature is free of charge.
Enable service interconnection
The first time you configure the service interconnection feature in a region, the simple application servers in the region stop for approximately 1 minute, which may result in business interruptions. We recommend that you configure service interconnection during off-peak hours.
Log on to the Simple Application Server console.
In the left-side navigation pane, click Service Interconnection.
In the top navigation bar, select the region and resource group to which the simple application server belongs.
In the upper-left corner of the Service Interconnection page, click Service Interconnection.
The first time you configure the service interconnection feature in an Alibaba Cloud account, you are prompted to confirm authorization. After you click OK in the message that appears, the system automatically creates a service-linked role for Simple Application Server. For more information, see the Create or delete the service-linked role section of this topic.
In the Configure Service Interconnection dialog box, configure parameters based on your business requirements.
The following table describes the parameters.
Parameter
Description
Region
The region that you selected in the top navigation bar is displayed. You cannot change the region. Example: China (Hangzhou).
CEN Instance
Select a CEN instance from the drop-down list. If no CEN instance is available in the drop-down list, click Automatic Creation to automatically create a CEN instance.
WarningSimple Application Server supports only CEN Basic Edition transit routers. If you select a CEN Enterprise Edition transit router that you created in the CEN console, the service interconnection feature of Simple Application Server is unavailable. For more information about CEN Basic Edition and CEN Enterprise Edition, see the Transit router editions section in the "What is CEN?" topic.
You can select only one CEN instance in a region. To change the CEN instance, you must remove all VPCs from the service interconnection list. For more information, see the Add or remove a VPC section of this topic.
VPC
Select the IDs of the VPCs for which you want to enable the service interconnection feature.
You can add VPCs to or remove VPCs from the service interconnection list in a region based on your business requirements. For more information, see the Add or remove a VPC section of this topic.
Click Confirm.
On the Service Interconnection page, you can view the VPCs that you added.
NoteIf a message appears indicating that a network conflict occurs and may disrupt service interconnection, we recommend that you test the interconnectivity of the VPCs. If the VPCs cannot be interconnected, resolve the issue as described in Question 1: What do I do if the "A network conflict occurs, which may cause discontinuity of service interconnection" message appears after I enable the service interconnection feature for VPCs in a region?
Test interconnectivity.
In this example, a simple application server in VPC 1 and an ECS instance in VPC 2 that belong to the same Alibaba Cloud account and reside in the same region are used. This example assumes that you selected VPC 2 for the VPC parameter in Step 5.
ImportantIf a simple application server and an ApsaraDB for Redis instance need to communicate with each other over VPCs, you must add the private IP address or CIDR block of the simple application server to the whitelist of the ApsaraDB for Redis instance. For more information, see Step 2: Configure whitelists.
Connect to the simple application server.
For more information, see Connect to a Linux server.
Run the ping command to ping the IP address of the ECS instance in VPC 2 and check the connectivity between the simple application server and the ECS instance.
The following figure shows a sample message, which indicates that the connection between the simple application server and ECS instance is established.
Add or remove a VPC
After you enable the service interconnection feature for VPCs in a region, you can continue to add VPCs to or remove VPCs from the service interconnection list.
Add a VPC: After you add a VPC, the simple application servers in the region are interconnected with the cloud services in the VPC.
Remove a VPC: After you remove a VPC, the simple application servers in the region are disconnected from the cloud services in the VPC.
Log on to the Simple Application Server console.
In the left-side navigation pane, click Service Interconnection.
Add a VPC to or remove a VPC from the service interconnection list.