Use existent VM Instace (bitnami) for Autoscale Gr

2019-01-17 19:11发布

I am using a Bitnami Wordpress for Google Cloud. Now, I need to setup a Instance Template -> Group of instances -> Load balancer and with this, my system will be autoscaling :)

But, I have the VM instance created using an boot image by Bitnami, and I need to put in a group of instance.

Can you help me with this, please?

1条回答
▲ chillily
2楼-- · 2019-01-17 19:31

The answer for creating a Highly scalable web application on GCP is very long and could be made as a blog post. Since writing the whole answer here will be very long and difficult to read, I have split the answer into 3 parts.

As you have mentioned, the steps for creating a Highly scalable web application on GCP can be divided as:

  1. Instance template
  2. Managed Instance Group and autoscaling
  3. Network / HTTP(s) load balancer

1. Instance Template: This is first step in creating this high scale web app. I have listed out the steps for creating an Instance Template here. One change, that you have to make in the template, is to change from CentOS 6 image to bitnami image.

Best practices: From my perspective, it is better to create a custom image with all your software installed than to use a startup script. As the time taken to launch new instances in the group should be as minimum as possible. This will increase the speed at which you scale your web app.

2. Managed Instance group and Autoscaling: I have written about the steps for creating Managed Instance group and Autoscaling here. As autoscaling and load balancing are independent, either of them can be set up first.

Best practices: Both autoscaling and load balancers offer health check to the instances. From my perspective, setting up the health check for both the services are redundant and I think health check for load balancer alone would do good.

3. Load balancer: GCP offers two types of load balancers namely, Network and HTTP(s) load balancer. I have written about the differences Network Vs HTTP(s) here. Since I assumed that you will be building a web stack out of bitnami image, I have written about the steps for setting up the HTTP load balancer here.

By following these three steps, I hope you would be able to build an highly scalable web app. This answer is based on my perspective. If anything is incorrect or If I had missed something, please feel free to comment and I will add it to the table.

查看更多
登录 后发表回答