×

Google App Engine - Architecture, Features, Advantages and Limitations

This article portrays how the App Engine works in terms of scaling, analysis of a typical App Engine application, different environments of GAE, benefits & limitations of this service, covering the architectural overview for better understanding of how the different components work.

Google App Engine - Architecture, Features, Advantages and Limitations

What is Google App Engine?

Google App Engine is a cloud computing Platform as a Service (PaaS) which provides Web app developers and businesses with access to Google’s scalable hosting in Google managed data centers and tier 1 Internet service. It enables developers to take full advantage of its serverless platform. These applications are required to be written in, namely: Java, Python, PHP, Go, Node.JS, . NET, and Ruby. Applications in the Google App Engine require the use of Google query language and store data in Google Bigtable.

Applications must comply with GAE standards. The legacy applications which are usually non-compatible to Google App Engine, must be rewritten with regards to Google App Engine to meet the standard requirements because not all the applications are supported by GAE. Google App Engine also removed system admin and manual tasks to make it easier to write scalable apps.

How is GAE used?

Users can create an account under GAE section, set up an SDK and write an application source code. They can use this to test and deploy code in the cloud. One way to use GAE is building scalable application back ends that adapt to workloads as needed. Another way to use GAE is for Application Testing. Users can route traffic to different app versions to A/B testing (It is a research methodology applicable in determining user experience. It is a randomized experiment with two variantsA and B. Also known as split testing or bucket testing, it is used to compare two versions of a webapp against each other to determine which one performs better.) and see which version performs better under various workloads.

Google App Engine Environments

Google Cloud provides two environments: 

1) Standard Environment with constrained environments and support for languages such as Python, Go, node.js

Features of Standard Environment:

  • Persistent storage with queries, sorting, and transactions.
  • Auto-scaling and load balancing.
  • Asynchronous task queues for performing work.
  • Scheduled tasks for triggering events at regular or specific time intervals.
  • Integration with other GCP services and APIs.

2) Flexible Environment where developers have more flexibility such as running custom runtimes using Docker, longer request & response timeout, ability to install custom dependencies/software and SSH into the virtual machine.

Features of Flexible Environment:

  • Infrastructure Customization: GAE flexible environment instances are Compute Engine VMs, which implies that users can take benefits of custom libraries, use SSH for debugging and deploy their own Docker Containers.
  • It’s an open-source community.
  • Native feature support: Features such as microservices, authorization, databases, traffic-splitting, logging, etc are supported.
  • Performance: Users can use a wider CPU and memory setting.

GAE Architecture

App Engine is created under Google Cloud Platform project when an application resource is created. The Application part of GAE is a top-level container that includes the service, version and instance-resources that make up the app. When you create App Engine application, all your resources are created in the user defined region, including app code and collection of settings, credentials and your app's metadata.

Each GAE application includes at least one service, the default service, which can hold many versions, depends on your app's billing status. 

The following diagram shows the hierarchy of a GAE application running with two services. In this diagram, the app has 2 services that contain different versions, and two of those versions are actively running on different instances:

Services

Services used in GAE is to constitute our large apps into logical components that can securely share the features of App Engine and communicate with each other. Generally, App Engine services behave like microservices. Therefore, we can run our app in a single service or we can deploy multiple services to run as a microservice-set.

Ex: An app which handles customer requests may include distinct services, each handle different tasks, such as:

  • Internal or administration-type requests
  • Backend processing (billing pipelines and data analysis)
  • API requests from mobile devices

Each service in GAE consists of the source code from our app and the corresponding App Engine configuration files. The set of files that we deploy to a service represent a single version of that service and each time when we deploy the set of files to that service, we are creating different versions within that same service.

Versions

Having different versions of the app within each service allows us to quickly switch between different versions of that app for rollbacks, testing, or other temporary events. We can route traffic to specific or different versions of our app by migrating or splitting traffic.

Instances

The versions within our services run over one or more instances. By default, App Engine scales our app with respect to the load accordingly. GAE will scale up the number of instances that are running to provide a uniform performance, or scale down to minimize idle instances and reduce the overall costs.

Major Features of Google App Engine

Some of the prominent GAE features that user can take advantage of include:

  • Language support: 

Google App Engine lets users’ environment to build applications in some of the most popular languages, including Java, Python, Ruby, Golang, Node.js, C#, and PHP. 

  • Flexibility: 

Google App Engine offers the flexibility to import libraries & frameworks through Docker containers.

  • Diagnostics:

Google App Engine uses cloud monitoring and logging to monitor health and performance of an application which helps to diagnose and fix bugs quickly. The error reporting document helps developers fix bugs on an immediate basis.

  • Traffic splitting:

Google App Engine automatically routes the incoming traffic to different application versions as a part of A/B testing. This enables users to easily create environments for developing, staging, production and testing. 

  • Security:

Google App Engine enables users to define access rules in Engine’s firewall and utilize SSL/TLS certificates on custom domains for free.

Google App Engine Pricing

GAE offers a usage-based plan for its users with free quota to trial out the service without costs.

GAE pricing is subdivided into Standard and Flexible models to cater users’ differing needs. Two pricing Environments are mentioned below: 

  • Standard Environment

Pricing for the Standard Env. starts with the free quota. Users are charged when they go beyond the limited resources which fall under the free quota. There are diverse hour-based billing rates depending upon the instance classes, and there are two types of scaling: basic scaling and manual scaling.

  • Flexible Environment

Pricing plan for Flexible Env. does not have any free quota. Under this, the applications of users have virtual machine deployments. The virtual machine’s billing is on a per-second basis with a minimum usage cost of 1 minute. Overall Cost is mainly depending upon the following variables:

  • V-CPU
  • Memory
  • Outbound Network
  • Persistent Disk

Advantages of Google App Engine

  • Easy to build and use the platform:

GAE is fully managed which lets developers lay focus on writing code with zero configuration and server management. It handles traffic management by automatic monitoring, patching and provisioning.

  • Scalability:

Google App Engine handles the workload fluctuations through scaling the infrastructure, by adding or removing instances or application resources as needed.

  • Various API sets:

Google App Engine has many built-in APIs and services which allows developers to build robust and versatile apps. These features include:

1) Application log Accessibility

2) Blobstore- serve large data objects

3) GAE Cloud Storage

4) SSL Support

5) Google Cloud Endpoint for mobile application

6) URL Fetch API, User API, Memcache API, File API, etc

Limitations of Google App Engine

  • Lack of control:

Although it’s a managed infrastructure which has its own advantages, if a problem occurs in the back-end, the users are then dependent on Google to fix it.

  • Limited access:

Developers have read-only access to the filesystem on GAE.

  • Java Limits:

Java apps. may only use a subset of the JRE standard edition classes and can’t create new threads.

  • Performance Limits:

CPU-intensive operations in GAE are slow and expensive to perform because one physical server may be serving several discreet, unrelated app engine users at once who need to share the CPU.

  • Language and frameworks Restrictions:

GAE does not support various widely-used programming languages and frameworks. Users have to depend on the custom runtimes to utilize other languages.

  • GAE can only execute code from an HTTP request.



Trendy