71. You have a content management system running on an Amazon EC2 instance that is approaching 100% CPU utilization. How to reduce the load on the Amazon EC2 instance?
- Create a load balancer, and register the Amazon EC2 instance with it.
- Creating alone an autoscaling group will not solve the issue, until you attach a load balancer to it. Once you attach a load balancer to an autoscaling group, it will efficiently distribute the load among all the instances. Option B – CloudFront is a CDN, it is a data transfer tool therefore will not help reduce load on the EC2 instance. Similarly the other option – Launch configuration is a template for configuration which has no connection with reducing loads.
72. When should I use a Classic Load Balancer and when should I use an Application load balancer?
A Classic Load Balancer is ideal for simple load balancing of traffic across multiple EC2 instances, while an Application Load Balancer is ideal for microservices or container-based architectures where there is a need to route traffic to multiple services or load balance across multiple ports on the same EC2 instance.
73. What does Connection draining do?
A.Terminates instances which are not in use.
B.Re-routes traffic from instances which are to be updated or failed a health check.
C.Re-routes traffic from instances which have more workload to instances which have less workload.
D.Drains all the connections from an instance, with one click.
Connection draining is a service under ELB which constantly monitors the health of the instances. If any instance fails a health check or if any instance has to be patched with a software update, it pulls all the traffic from that instance and re routes them to other instances.
74. When an instance is unhealthy, it is terminated and replaced with a new one, which of the following services does that?
A. Sticky Sessions
B. Fault Tolerance
C. Connection Draining
When ELB detects that an instance is unhealthy, it starts routing incoming traffic to other healthy instances in the region. If all the instances in a region becomes unhealthy, and if you have instances in some other availability zone/region, your traffic is directed to them. Once your instances become healthy again, they are re routed back to the original instances.
75. What are lifecycle hooks used for in AutoScaling?
They are used to put an additional wait time to a scale in or scale out event. Lifecycle hooks are used for putting wait time before any lifecycle action i.e launching or terminating an instance happens. The purpose of this wait time, can be anything from extracting log files before terminating an instance or installing the necessary softwares in an instance before launching it.
76.A user has set up an Auto Scaling group. Due to some issue, the group has failed to launch a single instance for more than 24 hours. What will happen to Auto Scaling in this condition?
A.Auto Scaling will keep trying to launch the instance for 72 hours
B.Auto Scaling will suspend the scaling process
C.Auto Scaling will start an instance in a separate region
D.The Auto Scaling group will be terminated automatically
Auto Scaling allows you to suspend and then resume one or more of the Auto Scaling processes in your Auto Scaling group. This can be very useful when you want to investigate a configuration problem or other issue with your web application, and then make changes to your application, without triggering the Auto Scaling process.
77. Suppose you have an application where you have to render images and also do some general computing.which service will best fit your need?
Application Load Balancer, since it supports path based routing, which means it can take decisions based on the URL, therefore if your task needs image rendering it will route it to a different instance, and for general computing it will route it to a different instance.
78. What is the difference between Scalability and Elasticity?
Scalability is the ability of a system to increase its hardware resources to handle the increase in demand. It can be done by increasing the hardware specifications or increasing the processing nodes.
Elasticity is the ability of a system to handle increase in the workload by adding additional hardware resources when the demand increases(same as scaling) but also rolling back the scaled resources, when the resources are no longer needed. This is particularly helpful in Cloud environments, where a pay per use model is followed.
79. How will you change the instance type for instances which are running in your application tier and are using Auto Scaling? Where will you change it from the following areas?
Auto Scaling launch configuration
Auto scaling tags configuration, is used to attach metadata to your instances, to change the instance type you have to use auto scaling launch configuration.
80. You have a content management system running on an Amazon EC2 instance that is approaching 100% CPU utilization. Which option will reduce a load on the Amazon EC2 instance?
Create a load balancer, and register the Amazon EC2 instance with it.Creating alone an autoscaling group will not solve the issue, until you attach a load balancer to it. Once you attach a load balancer to an autoscaling group, it will efficiently distribute the load among all the instances. Option B – CloudFront is a CDN, it is a data transfer tool therefore will not help reduce load on the EC2 instance. Similarly the other option – Launch configuration is a template for configuration which has no connection with reducing loads.