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

STARL Metaverse Project — Marketplace Status Update — January 10, 2022:

Stepwise procedure to connect with MySQL as a root user using Shell

Computer shortcuts to make life easy

A Yarn About Learning To Code

VolunteerRecruitment: Seeking Torah Earth keepers

Stable CI/CD is not a Myth, From Nexus-Jenkins to Github Packages-Actions

Debugging CSS

Screenshot of replay interface with React Calculator application, HTML element DOM tree, and applied CSS rules.

Event Driven Microservices with Spring Cloud Stream and RabbitMQ

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

Nitric, a Cloud Portability Framework for Code

Monitoring User Onboarding using Synthetic Canaries

Options For Building Real-Time Apps

Interface Endpoints Use Case