Amazon Aurora Database — Serverless game changer!
Serverless computing, a concept that has already gained towering traction in last few years. Enterprises are rapidly adopting the Serverless advantages in their IT landscape, where right shift to applications that requires no Infrastructure management. As serverless solutions for stateless applications gain popularity and adoption in next-generation software architectures, where does that leave the relational database? Still a crucial component for many, if not most, applications.
For many years, enterprises are still leveraging the rational database for their data layer. The adoption of cloud services enables enterprises to deploy database via an Infrastructure-as-a-code, substantially minimizing the operational overhead and complexity for the databases.
However, still all these data models rely on provisioning of database servers. Enterprises provision database capacity based on predicted workload characteristics that determine the size and configuration of your servers. Cloud already enable enterprises to scale their database capacity based on predicted workloads.
What is Aurora Serverless?
Aurora Serverless is an auto scaling and on-demand rational database service of AWS Aurora Database. As the name suggest “Serverless” enterprises don’t need to manage database or cluster. Aurora serverless scale up and down based on the requirements. Aurora Serverless is designed for “workloads that are highly variable and subject to rapid change, this new configuration allows enterprise to pay for the database resources you use, on a second-by-second basis.” Users provision an endpoint, which acts as a proxy that routes queries to a rapidly scaled fleet of database resources. Based on the information Amazon provides, Aurora Serverless will allow your connections to remain active even as scaling operations take place. Scaling is also supposed to be rapid, with new resources becoming online within seconds.
Aurora Traditional Vs Aurora Serverless
Let’s assume that enterprise has already decided to implement a new database with Aurora Classic as a provisioned model for their web application. A traditional AWS database is provisioned either with self-managed EC2 instance or through PAAS model. In both the model, enterprise has to allocate memory and cpu in addition to create security groups. A typical architecture looks like below.
In the above architecture, issue can arrive right at the connection. There are limits as to how many connections can access to the database before you start to see the performance degradation. In the following architecture, enterprise always have to plan of provisioning additional services such as caching layer or to add more read replicas where application logics needs to be rewritten to direct all read queries to multiple read replicas.
Thw following concern can now be addressed through Serverless framework. Where Aurora serverless provides more value. Serverless. Serverless focuses more on writing business logic and less on infrastructure management and provisioning to deploy from the requirements stage, to prod-ready quicker. In the traditional database model, enteprises are still responsible for securing the box, authentication, encryption, and other operations unrelated to the actual business functions.
Aurora Serverless provides to help alleviate issues with the scaling and connectivity is a backend as a Service solution. he application and Aurora instance must be deployed in the same VPC and connect through endpoints that go through a network load balancer (NLB). Doing so allows for connections to terminate at the load balancer and not at the application.
The NLB has routing logic through request routers that make the connection to whichever instance is available at the time, which then maps to the underlying serverless database storage. If the serverless database needs to scale up, a pool of resources is always available and kept warm. In the event the instances scale down to zero, a connection cannot persist.
By having an available pool of warm instances, you now have a pay-as-you-go model where you pay for what you utilize.
Benefits of Amazon Aurora Serverless Database:
1) Real Time Access: this means that now enterprises can access their data at a granular level. Amazon Aurora replicates data synchronously. This means, you will be able to constantly query, read, write, update and add new items to your database.
2) Scalability: using Amazon Aurora serverless databases can be scaled up or down automatically as per the demand of an application. If the application is querying, writing data to the same database cluster, it will scale computing needs automatically.
3) Security: Serverless database takes care of it by making sure that all the applications interacting with the same dataset passes the same protocol of access control.
4) Availability: Amazon Aurora Serverless Database is built on distributed, fault-tolerant, self-healing Aurora storage with 6-way replication to protect against data loss.
5) Cost Effective: Amazon Aurora Serverless database enables enterprises to pay only for the database resources they consume on per-second basis.
Use Cases of Serverless Database
- Simple Application: Simple and a new application which works independently only for a specific time frame. For instance, you have got a low-volume blog site and you want to pay only for the time any user is accessing your site, this works for you since you pay for the database resource you consume on a per-second basis.
1) Infrequently-Used Applications: Where you’re unsure how your user base is going to scale. For instance, you’ve built an app and you’ve no idea how popular it will become and also, you don’t want to take a chance, this works for you. Just create an end-point and let the serverless database auto-scale as per the requirements of your application.
2) Variable Workloads: An application where you’re likely to see around, say, 30 minutes of the peak for several hours a few times each day or several times per year. For instance, applications like HR, budgeting, operational reporting, etc. have highly unpredictable peak timings and hence, reserving instance is impossible. However, with the serverless database, you don’t have to provide to either peak or average capacity.
3) Test Databases: A test database, it is going to be used only during the working hours of your organization, well why pay for it when it is not in use? Serverless here is the best fit as it shuts down automatically when not in use.
Enterprise Scenario:
Telecommunications: in today’s world where customers are using large part of data from communication providers on move. Let’s assume a scenario where a mobile use is browsing an application using a data connection where he makes profile changes, a function — profile change will trigger, similarly a profile change will trigger another function to billing system, inventory system and a final function to trigger a notification to the end customer on profile changes update. Since, all these events need to occur in a real-time, serverless database can be used here as a most feasible solution.
Conclusion
The future of Serverless Databases, particularly AWS Aurora Serverless, look promising. The features of this modern technology have enabled enterprises to draw focus on essentials like real-time access, scalability, security, and availability.