Cloud Computing: Come Creare una Applicazione Serverless

In October 2017 I presented for the first time at Codemotion in Berlin. Three years later, I designed and recorded my first course for them: “Cloud Computing: Come Creare una Applicazione Serverless” is a module of fourteen short lessons in Italian, just over two hours of video content plus exercises. The course uses a simple URL shortener as an example of a serverless application on AWS. It is now available on Codemotion and it is free!

CloudWorld 2021

I am taking three months off from public speaking to recharge my batteries and work on new content, but I will back on stage next February at CloudWorld 2021 to talk about cost optimization on AWS with a special focus on storage and data. This is a new topic I never covered before but that I am really passionate about. The title and abstract of my session at DeveloperWeek are below.

Learn how to manage better your costs on AWS, make your bill less scary or your credits last longer

Should you really always run your cluster in multiple availability zones? How can a transition rule to Glacier double your storage costs? I want to monitor and understand my data transfer costs, where should I start? Why are backups eating my database budget? What, one more storage class on S3? Following so-called “best practices” works only when you fully understand the implications, costs included. We will address a few cloud anti-patterns, making your bill smaller and your deployment better.

Looking forward to one more virtual conference in 2021!

AWS Data Hero

Excited, surprised, humbled at being recognised by the AWS Heroes program. I am now a AWS Data Hero, the first one in Germany. Looking forward to this new opportunity and challenge!

InfoQ – September 2020

A recap of the news articles I wrote for InfoQ in September 2020.

Multi-Cloud: Worst Practice or the Future of Public Cloud?

Corey Quinn, cloud economist at The Duckbill Group, recently argued that multi-cloud is “the worst practice to be avoided by default”. Not everyone agrees.

Photo by John Maravelakis on Unsplash

Google Cloud SQL Supports MySQL 8.0

Google Cloud has recently made MySQL 8.0 available on Cloud SQL, the managed relational database service for MySQL, PostgreSQL, and SQL Server.

AWS Introduces New EBS Volume io2 With Higher Durability and IOPS/GiB

AWS recently introduced a new provisioned IOPS volume type (io2) for high-performance databases and workloads that offers a durability of 99.999% and the ability to provision up to 500 IOPS for every GiB of storage.

Public Beta of Google Cloud API Gateway Now Available

At the recent Google’s Cloud Next virtual conference, Google announced the public beta of API Gateway, a fully-managed Google Cloud service to create and monitor APIs for serverless workloads.

Is the AWS Free Tier Really Free?

Corey Quinn, cloud economist at The Duckbill Group, argues that the free tier in AWS is broken and AWS should change it. The free models of the main cloud providers differ and might not help beginners in following best practices in cloud deployments.

Using Serverless Backends to Iterate Quickly on Web Apps

In a series of three technical articles, AWS has recently shown the advantage of building serverless backends to iterate quickly on web apps and be able to follow changing product requirements. These development methodology and architecture allow flexibility but increase coupling with cloud vendor services.

Amazon Cloudwatch Dashboards Supports Sharing

AWS recently introduced the ability to share Amazon CloudWatch Dashboards with users who do not have access to the AWS account. This feature opens up new use cases for dashboards, including sharing metrics and information on big screens, or embed real-time information in public pages.

InfoQ – July 2020

A recap of the news articles I wrote for InfoQ in July 2020.

The AWS Serverless LAMP Stack: the Future of PHP or Vendor Lock-in?

In a series of three technical articles, AWS has recently introduced the new “Serverless LAMP stack”. But not everyone in the open-source community believes that the successor of the LAMP stack is proprietary technologies from a single vendor, and alternative approaches have been suggested.

The AWS Serverless LAMP Stack: The Future of PHP or Vendor Lock-in?

AWS Announces General Availability of Amazon RDS Proxy

Amazon RDS Proxy is a new fully managed, highly available database proxy for MySQL and PostgreSQL databases running on Amazon RDS and Aurora. The service is tailored to serverless architectures and other applications that open and close database connections at a high rate

A Second Look at Amazon RDS Proxy

At re:Invent in Las Vegas in December 2019, AWS announced the public preview of RDS Proxy, a fully managed database proxy that sits between your application and RDS. The new service offers to “share established database connections, improving database efficiency and application scalability”.

Does RDS Proxy make MySQL more elastic?

A first look

In January I shared some thoughts and first results at the AWS User Group Meetup in Berlin and I wrote a post for the Percona Community Blog: A First Look at Amazon RDS Proxy.

One of the key features was the ability to increase application availability, significantly reducing failover times on a Multi AZ RDS instance. Results were indeed impressive.

But a key limitation was that there was no opportunity to change the instance size or class once the proxy has been created. That means it could not be used to reduce downtime during a vertical scaling of the cluster and made the deployment less elastic.

Time for a second look?

Last week AWS announced finally the GA of RDS Proxy and I thought it was a good time to take a second look at the service. Any further improvements in the failover? Can you now change the instance size once the proxy has been created?

Weird defaults?

One of the first and few values you should choose when you set up an Amazon RDS Proxy is it the idle client connection timeout. It is already hard to figure out the optimal value in an ideal scenario. But having a user interface that suggests a default of 30 minutes with a label that states “Max: 5 minutes” makes it more difficult. Almost all if the drop down list let you set any value up to 1 hour.

5 or 30 minutes?

Let us play!

I created again a test-rds and a test-proxy and I decided to perform the very same basic tests I did last December. I started two while loops in Bash, relying on the MySQL client, each one asking every 2 seconds the current date and time to the database:

$ while true; do mysql -s -N -h test-proxy.proxy-***.eu-central-1.rds.amazonaws.com -u testuser -e "select now()"; sleep 2; done
$ while true; do mysql -s -N -h test-rds.***.eu-central-1.rds.amazonaws.com -u testuser -e "select now()"; sleep 2; done

Both return the same results:

2020-07-04 20:24:12
2020-07-04 20:24:14
2020-07-04 20:24:16
2020-07-04 20:24:18

So far so good. I then trigger a reboot with failover of the test-rds instance. What is the delay on the two endpoints?

test-proxy

2020-07-04 20:24:56
2020-07-04 20:24:58
2020-07-04 20:25:20
2020-07-04 20:25:22

test-rds

2020-07-04 20:24:56
2020-07-04 20:24:58
2020-07-04 20:27:12
2020-07-04 20:27:14

The difference between the test-proxy and the test-rds is significant: it takes 132 seconds for the RDS endpoint to recover versus only 20 seconds for the proxy. Amazing difference and even better than what AWS promises in a more reliable and significant test.

But what happens when I trigger a change of the instance type? 

While the numbers for the test-rds do not change significantly, the proxy is simply gone. Once the database cluster behind changes, the proxy endpoint is still available but it does not connect to the database anymore. Changing time out does not help, with no simple way to recover.

test-proxy

ERROR 9501 (HY000) at line 1: Timed-out waiting to acquire database connection
ERROR 9501 (HY000) at line 1: Timed-out waiting to acquire database connection
ERROR 9501 (HY000) at line 1: Timed-out waiting to acquire database connection
ERROR 9501 (HY000) at line 1: Timed-out waiting to acquire database connection
ERROR 9501 (HY000) at line 1: Timed-out waiting to acquire database connection
Photo by Andrew Winkler on Unsplash

As for today, at least for MySQL 5.7 on RDS, introducing the proxy in the architecture makes the environment less elastic. As you have no option anymore to introduce any manual or automatic (vertical) scaling of the database to match traffic. Any change to the database becomes more problematic.

Anything else? There are a few other well documented limitations still present, including the lack of support for MySQL 8.0.

A final recap

Amazon RDS Proxy is a very interesting service. And it could be an essential component in many deployments where increase application availability is critical. But I would have expect a few more improvements since the first preview. The lack of support for changes of the instances makes it still hard to integrate it in many scenarios where RDS is currently used.