AppEngine And Elastic Beanstalk

Vishakha Kulkarni
CloudWithMORE
Published in
4 min readApr 13, 2018

The future of cloud computing is in managed services and platform as a service offering. The idea behind PaaS is to completely de-couple infrastructure management and configuration from application deployment and running. With this approach, you do not need to provision resources, monitor the state of the application/infrastructure or manage scaling. Developers just need to deploy code and the platforms take care of the rest.

Introduction

AppEngine and Elastic Beanstalk are platform as a service offering from Google and AWS respectively and here we will compare the two.

AppEngine has 2 variants — standard environment and a flexible environment. The standard environment comes with predefined common runtimes such as java8, python2.7, Go etc. For most applications, the runtimes supported by standard environment should be sufficient. However, in case you need a version of a library or a runtime not supported by standard, there is the flexible environment. In this case, in addition to your application, you also need to provide a configuration file which lets the platform know what kind of environment to create for your application. You can also provide your own docker to run the application.

ElasticBeanstalk too has a similar approach with a host of platforms supported out of the box. These include Java, Java SE with tomcat, python, Go etc. With beanstalk too, you can provide your own dockers and for advanced customization, you can opt for “custom platforms” where in you can provide a configuration file that defines your environment — similar to flexible environment from App Engine.

Deployments

Both the platforms provide a CLI for application deployment.

ElasticBeanstalk additionally allows for application deployment through the console where in you can deploy your jar/war and other deployment artifacts.

Deployment Models.

Most Platform as a service offerings are aimed at easing microservices deployments. In case of Beanstalk each service is deployed to an “environment”. Each environment has only one active version at any given time. The beanstalk console allows you to clone an environment and to assist in blue-green deployments — the console provides an option to swap the URLs between the 2 environments.

AppEngine on the other hand, allows for “services” and each services can have multiple versions active at any given time. Each version has its own URL. App Engine allows for “traffic splitting”. Using this, requests to a service can be split between different versions of the same service. This split can be based on IP range or cookies. This is a very effective technique for canary releases. Once testing is satisfactory, with a click, all traffic can be directed to a particular version of the service.

This is by far the easiest to use and convenient feature of app-engine.

Logs

One of the most important thing an application developer needs once the application is deployed to production is access to logs. While logs are straightforward to access on instances/machines, what do you do when you are working with PaaS? It is for the platform to provide logs. In case of Elastic Beanstalk, the platform lets you view logs from the AWS console, however this is similar to getting a snapshot of logs at the time you are viewing them. The logs appear just as though you did a tail on the log files in a linux box; tail, not tail -f. In case you want to do some thorough analysis, you have the option of downloading the logs to your local machine.

AppEngine provide a real-time view of the logs, where recent logs keep getting loaded in the console and hence you get a stream of consolidated logs. You can filter the logs for different log levels, times or content. For advanced debugging you can set up log exports to Google Cloud Storage, or better still to Google Cloud BigQuery. In BigQuery, you can use sql-queries for advanced analysis of your logs. App Engine scores a brownie point here.

Application Configuration

Most application/services, do need some amount of configuration and this is generally either properties files or some configuration files. AppEngine allows such configuration parameters to be specified in xml or yaml files.

Elastic beanstalk in addition also allow for environment variable to be set and applied through the console. A definite plus, this.

Summary

So, we have compared some aspects of both appengine and elastic beanstalk and both have their own strengths. While beanstalk provides a UI making management of environments very convenient, appengine relies on build tools and CLI for this. However, access to logs and managing services and versions through traffic splitting is better in app-engine.

Originally published at c1oudwars.wordpress.com on April 13, 2018.

--

--