API Development Best Practices for Reliable and Scalable Workloads

Minimizing Operational Overhead for Your Go 1.12 HTTP(S) API

Question

An application development team has come to you for advice.

They are planning to write and deploy an HTTP(S) API using Go 1.12

The API will have a very unpredictable workload and must remain reliable during peaks in traffic.

They want to minimize operational overhead for this application.

Which approach should you recommend?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.

Based on the given scenario, the most suitable approach would be to develop the application with containers and deploy to Google Kubernetes Engine (GKE). Here is the detailed explanation for why this is the recommended approach:

A. Develop the application with containers, and deploy to Google Kubernetes Engine:

Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. Kubernetes is highly recommended for unpredictable workloads because it can automatically scale the application based on demand, ensuring that the application remains reliable during peaks in traffic.

GKE is a managed Kubernetes service provided by Google Cloud Platform (GCP). GKE provides the ability to deploy, manage, and scale containerized applications on Google's infrastructure. It provides a reliable, secure, and scalable platform for deploying containerized applications.

Using containers for deployment ensures that the application can be packaged and deployed consistently across different environments. This approach also enables developers to build and test the application locally and then deploy it to production in the same containerized format, minimizing the operational overhead of managing the application in production.

Therefore, developing the application with containers and deploying it to GKE is the recommended approach for the given scenario.

B. Develop the application for App Engine standard environment:

App Engine is a platform-as-a-service (PaaS) offering from GCP that allows developers to build and deploy web applications and APIs without worrying about the underlying infrastructure. App Engine provides automatic scaling and built-in security features.

However, the standard environment for App Engine does not provide as much flexibility and control as Kubernetes. In addition, the standard environment may not be suitable for unpredictable workloads since it has a fixed instance size and may not be able to scale up quickly during peaks in traffic.

C. Use a Managed Instance Group when deploying to Compute Engine:

Compute Engine is an infrastructure-as-a-service (IaaS) offering from GCP that allows developers to create virtual machines (VMs) on Google's infrastructure. Managed Instance Groups (MIGs) allow developers to manage groups of VMs and automatically scale them based on demand.

However, using MIGs requires more operational overhead than using Kubernetes since developers are responsible for managing the VMs and the application deployment on the VMs.

D. Develop the application for App Engine flexible environment, using a custom runtime:

The flexible environment for App Engine allows developers to deploy custom runtime environments for their applications. This approach provides more flexibility than the standard environment, but it still may not provide as much control as Kubernetes.

In addition, the flexible environment may not be suitable for unpredictable workloads since it has a fixed instance size and may not be able to scale up quickly during peaks in traffic.

Therefore, while the flexible environment may be a suitable option in some cases, it is not the recommended approach for the given scenario.