The deployment scenario becomes complex when there are database changes during the upgrade. There can be two different scenarios: 1. database change is backward compatible (e.g. adding a new table column) 2. database change is not compatible with an older version of the application (e.g. renaming an existing table column)
1. Backward compatible change: This scenario is easy to implement and can be fully automated using Flyway. We can add the script to create a new column and the script will be executed at the time of deployment. Now during blue/green deployment, two versions of the application (say v1 and v2) will be connected to the same database. We need to make sure that the newly added columns allow null values (btw that’s part of the backward compatible change). If everything goes well, then we can switch off the older version v1, else application v2 can be taken off.
2. Non-compatible database change: This is a tricky scenario, and may require manual intervention in-case of rollback. Let's say we want to rename first_name column to fname in the database. Instead of directly renaming, we can create a new column fname and copy all existing values of first_name into fname column, keeping the first_name column as it is in the database. We can defer non-null checks on fname to post-deployment success. If the deployment goes successful, we need to migrate data written to first_name by v1 to the new column (fname) manually after bringing down the v1. If the deployment fails for v2, then we need to do the otherwise.
Posted Date:- 2021-11-27 08:39:36
What is elastic blockage storage in Lambda?
What are the best practices for security in Lambda?
Do you think there is a relation between Instance and AMI?
Name the type of Storage provided by Amazon?
What do you know about Auto-Scaling?
What do you know about Zero downtime deployment?
What is the time limit for execution in Lambda when you perform DDOS?
How to achieve zero-downtime deployment(blue/green) when there is a database change?
What makes Lambda a time-saving approach?
Is there any disadvantage of using this approach too? What do you think?
Is it possible to debug and troubleshoot the micro or small services?
What are the advantages of using the Serverless approach?
Tell us about the frameworks which are available for serverless?
What should be preferred communication style in microservices: synchronous or asynchronous?
Why Microservices are better than Monoliths?
Explain how can you scale a microservice based system?
What is client side and server side service discovery?
Mention which markup language can be used in restful web api?
List out the tools or API for developing or testing web api?
How would you test microservice based architecture?
When should one consider microservice kind of architecture?
What are microservices and why would someone want to look at implementing it.
Mention what is JAX-WS and JAX-RS?
What kind of testing environment is needed for API?
What tests can be performed on APIs?
What factors help inform your decision on which style of Web services—SOAP or REST—to use?
Mention what are resources in a REST architecture?
Mention whether you can use GET request instead of PUT to create a resource?
What is the difference between API and Web services?
What kinds of bugs does API testing find most commonly?
What are the primary challenges of API testing?
What is the procedure for performing API testing?
What are the advantages of API Testing?
What are some styles for creating a Web API?
How can we call an API Gateway API?
How can we use API Gateway to create HTTP APIs?
What API types are supported by Amazon API Gateway?
What are the Features of API Gateway?
What are the processes involved in working with AWS lambda and API Gateway?