Accessing Google API over CEN

Prerequisites

  1. Alibaba Cloud Account
  2. 2 VPC’s one in China Region and the other in the International region. We have considered Beijing and London in this document
  3. 2 ECS instances 1 in Beijing VPC and the other in the London VPC
  4. CEN Configuration Across the two VPC’s
  5. Access to Google APIs for testing. We are using the Google Texttospeech API and the Google Translate API for the test.

Architecture Overview

  1. The VPC in Beijing hosts an ECS instance running Centos 7 which will be the client machine wanting to access the Google APIs
  2. The VPC in London hosts an ECS instance running Centos 7 and Apache 2.4.6
  3. The VPC in London connects to Google API’s over standard Internet

Initial Setup

  1. The IP for the ECS instance in Beijing is 192.168.0.201
  2. The IP for the ECS instance in London is 172.16.0.31

Install and Configure Apache

  1. mod_proxy, the main proxy module Apache module for redirecting connections; it allows Apache to act as a gateway to the underlying application servers.
  2. mod_proxy_http, which adds support for proxying HTTP connections.
  3. mod_proxy_balancer and mod_lbmethod_byrequests, which add load balancing features for multiple backend servers.

Configure Apache for Reverse Proxy

Conclusion

Further Reading

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Evolution of the Alibaba Cloud Pangu Distributed Storage Technology

Worst abuse of the C preprocessor (IOCCC winner, 1986)

Signs of a Failing Scrum Team (And Some Ideas To Help)

Commander is a Swift framework for decoding command-line arguments by integrating with Swift…

GO COIN X Yesports Giveaway

Getting to know CSS better

Creating High Availability Architecture with AWS CLI

Going Remote

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

How to create a Lambda Validator for AppConfig?

Run Amazon Kinesis Client Library(1.x) on LocalStack

Migrating and Converting Databases to Amazon Aurora RDS Postgres

Build flexible abstraction for any Kubernetes Resources with CUE and KubeVela