Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers - Order By Rating | ||||
![]() ![]() | ||||
| ||||
Ans. Yes | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. No | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Inline functions , just like C++ Macros is an optimized technique used by compiler to reduce the execution time. If the function is working on pre identified values ( which aren't resolved at runtime ), the function can execute the method and evaluate the outcome at compile time only instead of making a function call at runtime. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Inline functions , just like C++ Macros is an optimized technique used by compiler to reduce the execution time. If the function is working on pre identified values ( which aren't resolved at runtime ), the function can execute the method and evaluate the outcome at compile time only instead of making a function call at runtime. In Java, the optimizations are usually done at the runtime or JVM level. At runtime, the JVM perform some analysis to determine which methods to inline. Java compiler would never inline any method and there is no way in java for the developer to explicitly define inlining of methods as it's take intrinsically care of during runtime only. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. No of requests, computation duration, assigned RAM | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Advantages - Much Cheaper Continuous scaling Higher level and Serverless Disadvantages - Warm up time Limited flexibility in terms of technologies Limited control | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. EC2 is IAAS Elastic Beanstalk is PAAS EKS is Containerization service Lambda is Serverless | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Following are key differences between containers and serverless: Supported host environments: Containers can run on any modern Linux server, as well as certain versions of Windows. In contrast, serverless runs on specific host platforms, most of which are based in the public cloud (like AWS Lambda or Azure Functions). Self-servicing ability. For the reasons just noted, in most cases, serverless functions require you to use a public cloud. (There are on-premises serverless frameworks, like Fn, but these are not yet widely used.) With containers, you can set up your own on-premises host environment, or use a public cloud service like ECS. Cost. Because serverless environments are hosted in the cloud, you have to pay to use them. In contrast, you can set up a container environment yourself using open source code for free (although you’ll still have management costs, of course). Supported languages. You can containerize an application written in any type of language as long as the host server supports the language. Serverless frameworks are different; they support a limited number of languages. The details of supported serverless language vary from serverless platform to platform. Statefulness. Most serverless platforms are designed to support stateless workloads. (Some serverless providers offer limited support for stateful services; cf. Durable Functions on Azure.) Although you can connect to external storage services (like S3 on AWS) from within serverless platforms, the functions themselves cannot be stateful. Containers present their own persistent storage challenges, but creating stateful containerized apps is certainly possible. Availability. Serverless functions are designed to run for a short period—usually, a few hundred seconds—before they shut down. Containers can run for as long as you need. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. S3 is object based whereas EFS is block based. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Both EFS and EBS are block storage but EBS is reserved storage whereas EFS is On Demand. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. No but we can create an AMI and then launch a new instance in placement group. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. No | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. No, only the following type are allowed Compute Optimized GPU Memory Optimized Storage Optimized | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Clustered and Spread All instances in Clustered group is in same availability zone and whereas instances in spread could be in different az or regions. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. yes, you can create auto scaling policy to set max and min no of instance. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Default size is 10. Regard how size will increase. Inside add() method there is one method called ensureCapacity() which will check list has enough size available. This ensureCapacity() method if found size of list need to increase then it will call grow() method which will create new list of extra size and copy existing list data to new one and return. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. object / native type returned can only be one but an object can comprise of a array , collection or a group of different value types. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Base Class is a relative term used to signify the Parent class in Parent - Child or Base - derived relationship. Derived Class is a relative term used to signify the Child class in Parent - Child or Base - derived relationship. Abstract Class is a class that is not allowed to be instantiated and hence can serve only a base class for it's usage. Concrete Class is the class which is supposed to be instantiated and hence provide definition for all implementing interface methods and extending abstract methods. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Yes, an abstract class can extend another class. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Abstract Class is a class that's only allowed to be a Base class for it's usage. It can never be instantiated on it's own. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Base Class is a relative term. For example - Class Vehicle is a Base class of Class Car. Even though Base class is derived in this case , there is no restriction on instantiation of Vehicle class. Abstract Class is a class that is meant only to be a Base Class and not allowed to be instantiated. Abstract Class is a Base Class that isn't allowed to be instantiated and is only meant for carrying definition to derived class and help participate in runtime polymorphism. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. JVM - With Cloud and Serverless, this could be a hurdle for it to be preferred technology. Confusion between OOP and Functional Programming. Slower speed of innovation due to wider adoption. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. CloudTrail | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. CloudWatch is for monitoring resources whereas CloudTrail is for auditing activity. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. 5 mins for Standard / Basic 1 min for Detailed / advanced | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. CPU, Disk, Network, Status | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Only Basic not advanced | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. We can use this check for variety of things - 1. Monitoring the status / Alarms in case it's down 2. Regulating traffic to healthy instances only through Load Balancer | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Internal Load balancer is used for services which are for internal consumption only and hence doesn't need to direct Web traffic. External Load balancers are for regulating web traffic. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Application Load Balancer is high level ( Level 7 Networking Layer ) and provides better features and flexibility than Network Load Balancer ( Level 4 Network Layer ) Network Load Balancer is turn provides better performance as it regulates raw traffic. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() ![]() | ||||