Use Google Cloud Virtual Private Cloud for secure communication between services
Use Cases and Deployment Scope
Most of the microservices I use are deployed in Cloud Run. I configured a serverless connector for these services to communicate with each other privately. The serverless connector can be configured with min and max number of instances so that it can automatically scale based on workload. Being serverless the cost of using the connector works out low for my use case.
Pros
- Serverless connector helps Cloud Run services to communicate privately.
- Serverless connector supports auto scaling.
- Being serverless, the cost is based on usage for serverless connector.
Cons
- Cannot reduce minimum number of instances than the previously set value. Workaround is to delete the connector and create a new one with a lower minimum number of instances.
- Cannot set minimum number of instances below 2 for a serverless connector.
- The instance and bandwidth options for a serverless connector seem to be too few.
Likelihood to Recommend
Google Cloud Virtual Private Cloud (VPC) is well suited to use when you have micro services that need to communicate with each other privately. When the micro services are deployed as Cloud Run services or Cloud Functions then you can use a serverless connector for communications between the micro services. It would be useful if the product can provide some recommendations to configure networking in cloud for best performance.