Serverless DevOps Flashcards
Give characteristic of serverless application
- No servers to provision or manage
- Automatically scales with usage
- Never pay for idle
- Highly available
Name few service in AWS which are serverless
Any service which fullfil the characteristic of serverless is serverless service
- Lambda
- DynamoDB
- Api Gateway
- Step Functions
- Simple Queue Service
What are advantage of serverless
- No Patching headache
- No scaling headache
- Pay for only usage
What are disadvantage of serverless
- You can’t install any software like Webserver, Appserver
- For AWS Lambda, can only have a memory from 128 MB to 3 GB
- Your serverless function needs to complete in 1 sec to 15 mins. You can’t run long-running operations in a serverless function
- You can’t add hard disk, or deployment package size is limited
What are use case for serverless
It shines in the event-driven architecture
- Say, you need to process something when the file is added to S3 or Kinesis
- It is suited when traffic is unpredictable, automation calling, pay as you go
- It use in a microservice architecture, it has integration with API Gateway, the Code is modular with software, easier to migrate to cloud-native, green fields apps
On what parameters, Lambda cost is calculated?
- Number of time functions run in a month
- Memory used by the function
- Time is taken to execute the function
What is serverless alternative to Microservice running on EC2
Lambda-API Gateway
What is serverless alternative to Web server running on EC2
Website hosting using S3 + Lambda-API Gateway
What is Serverless alternative to Databases on EC2?
Amazon RDS, Amazon Aurora
What is Serverless alternative to Self Managed K8 cluster on EC2?
EKS, Fargate, ECS
What is a Serverless alternative to ML on EC2
SageMaker
There is a scenario where the client sends messages which need to be put in the SQS queue. What would you use, load balancer or API Gateway?
AWS Loadbalancer Target group can support Lambda, apart from Instance and IP. But, you need lambda or some code on EC2 to put to SQS
https://medium.com/nerd-for-tech/aws-lambda-behind-application-load-balancer-75f71413c9e6
AWS API Gateway can directly put message in SQS queue without the need of lambda or any code
What is the difference between Equality-based and Set-Based label selector
Labels are used to filter out the kubernetes resource.Kubernetes has two selectors
Equality-based: Use =,==,!= and two Equality-based are used, it use as AND operator
Set-based: environment in (production, qa) OR operator
What are the federated cluster in Kubernetes
Base cluster to manage multiple clusters.
E.g. Rancher, CrossPlane, etc.