Skip to main content

GCP: Instance group


Managed instance group contains identical instnaces, created from an instance template. Supports auto scaling, auto healing, rolling updates, load balancing. VM instances are stateless and disks are deleted on VM recreation. It is possible for load balancer to send traffic to instance group through a named port.

Configure autoscaling on and autoscaling policy. Auto scaling policy directs when to auto-scale, based on CPU utlization, HTTP load balancing utilization, Stack driver metric, or combination of the above. It is possible to specify maximum number of instances that can be in instance group. Enable auto healing through healhcheck configuration.

Instance group while running, you can add/remove labels. You can do modifications just as you can do with an instance running.

With instance group you can have rolling update, rolling restart/replace actions. When performing rolling update, perform canary deployment, and make sure that no rollback is needed. If rollback is needed, turn the traffic back to older template.

It is also possible to rolling restart or replace with Instance group.
Note that Instance template cannot be edited

Sample question:

A recent software update to an e-commerce website running on Google Cloud has caused the website to crash for several hours. The CTO decides that all critical changes must now have a back-out/roll-back plan. The website is deployed on hundreds of virtual machines (VMs), and critical changes are frequent. Which two actions should you take to implement the back-out/roll-back plan? (Choose two)

- Turn on the object versioning of GCS, let the previous version of static assets be maintained.
- Use managed instance groups with the “update-instances” command when starting a rolling update

Note:
Unmanaged instance group is for load balancing dissimilar instances that can be added/removed arbitrarily. Auto scaling, auto healing, rolling updates are not supported for unmanaged instance group.




























Comments

Popular posts from this blog

GCP: GAE - Memcache best practices

Memcache is a distributed in-memory data cache in front of or in place of robust persistent storage for some tasks. GAE includes a memory cache service for this purpose. Best practices for using memcache: 1. Handling memcache API failures gracefully; Do not expose errors to the end users 2. Use batching capability of the API when possible 3. Distribute load across your memcache keyspace Use sharding and aggregating for improving performance efficiency. Use TTL (expiration policy) to make sure the memcache does not fill-up indefinitely Use getIdentifiable() and putIfUntouched() for managing the values that may get affected by concurrent updates Use batching (getMulti ("comments", "commented_by") ) to fetch related values together instead of one by one Use graceful error handling

Essential GCP services for a new age application

Identity and resource management IAM  Identity aware proxy Resource Manager Stackdriver Monitoring Stackdriver Monitoring: Infrastructure and application monitoring Stackdriver Logging: Centralized logging Stackdriver Error Reporting: Application error reporting Stackdriver Trace: Application performance insights (latency) Stackdriver Debugger: Live production debugging Development management Cloud Deployment Manager: Templated Infrastructure deployment Cloud Console: Web based management console Cloud shell: Browser based terminal/CLI Development tools Cloud SDK: CLI for GCP Container registry: Private container registry Container builder: Build/Package container artifacts Cloud source repository: Hosted private git repository Database services Cloud SQL: Managed MySQL and PostgreSQL Cloud BigTable: HBase compatible non-relational DB Cloud Datastore: Horizontally scalable non-relational (ACID) Cloud Spanner: Horizontally scalable relation...

Media distribution platform

Media distribution platforms focus on effective distribution of the media content, predominantly videos. With the increasing demand on enabling the web presence with dynamic video content, the platform adds immense value paving ways for generating revenue. It is not unusual to see the popular content management organizations will expand to provide media distribution services. In simple words, media distribution involves content ingestion, content processing, content categorization, content management, content protection, content distribution, content delivery targeted specifically to content consumption layer. Content ingestion is a process of gathering content from various sources. When acquired from various sources, they need to converted in uniform format to manage it efficiently. For example, news clip recorded on the field can be in raw digital format, or user generated home video uploaded to the system, or Warner brothers new movie made available in the system. Before making the...