In this series, we explore the power of containers and Kubernetes in combination with Neo4j. Last week, we provided some background on GKE and Neo4j.
This week we look at the benefits of running Neo4j on GKE including ease of deployment, technical flexibility, autoscaling and security. We also highlight a common design pattern: building apps with GraphQL.
Deploying & Running Neo4j with GCP Marketplace
Deploying Neo4j on Kubernetes manually involves coordinating a number of components that work well together.
Thanks to the GCP Marketplace and joint engineering by Neo4j and Google, deploying Neo4j on GKE is almost as easy as installing a smartphone app. Once you decide you want to implement Neo4j, it’s possible to get a high availability graph database cluster up and running in as little as 10 minutes.
While you always have the option to see and manage the individual pods and services, with GCP Marketplace, the entire cluster appears as a single Kubernetes “app.” This means you can treat your Neo4j cluster as a single distributed application talking to other distributed applications. Behind the curtains, GKE takes care of StatefulSets, pods and volumes for you.
Neo4j with GKE Brings Technical Flexibility and Agility
Ease of deployment is not a tradeoff for technical flexibility. Power users can customize Neo4j as desired for more control. (See the Neo4j on GKE User Manual on GitHub for details on how to customize Kubernetes resources.)
Think of Neo4j as a LEGO® block that functions easily alone or as an add-on to your other databases, applications and microservices, since GKE makes it easy to run different workloads alongside each other. Some organizations deploy multiple databases to solve different problems, utilizing each of them in their areas of strength (a.k.a. polyglot persistence).
Problems that mine connections and relationships among multiple entities are best queried by Neo4j. Full-text search might access Elasticsearch while MySQL could serve as a central system of record.
With GKE, you choose which persistence store makes the most sense for each aspect of your application. This translates into business agility as you solve problems that are inherently “graphy” in nature, including a variety of use cases.
Expanding Your Neo4j Cluster as Needed
GKE helps you automatically and seamlessly get the most out of your resource pool and handle increased user demand for your services. You can automatically transition from a single machine to thousands.
If you have dozens of containers on your pool of servers, with GKE autoscaling, you have the ability to automatically ramp up with more servers and more containers to meet increased web traffic or user demand. Neo4j also allows you to scale down easily to save money. GKE makes it easy to automatically manage your infrastructure and schedule such tasks, offering you flexibility and agility.
Security, Managed for You
With GKE, you run Neo4j and your other applications securely on Google’s network. Connect to and isolate clusters no matter where you are with fine-grained network policies using Global Virtual Private Cloud (VPC) in Google Cloud. GKE protects your applications against denial-of-service and other types of edge attacks on your containers.
Further, Google updates Kubernetes for you. Security bulletins related to GKE are available at any time to answer specific questions. Bottom line: Having Google manage Kubernetes for you offers greater uptime and security than most organizations achieve on their own.
Because Kubernetes is open source, it is cloud-agnostic. Many businesses take a multi-cloud approach, adding more cloud deployments to their existing architecture, thus preserving their investments.
Developing on one cloud and deploying on another is no problem with GKE. With a multi-cloud approach, you easily move applications to fit your IT business goals and needs. There’s no vendor lock-in: You’re free to take your applications out of GKE and run them anywhere Kubernetes is supported, including on your own on-premises servers.
Building Web Applications with GraphQL
Back to those LEGO® blocks, a common way to integrate Neo4j into your technology stack is by building an API application that exposes the database. GraphQL is rapidly being adopted as a preferred method of building APIs. GraphQL backends can be deployed both in containerized environments and as serverless functions.
The GRANDstack (GraphQL, React, Apollo, and Neo4j Database) allows developers to create GraphQL APIs backed by Neo4j with minimal effort. GRANDstack is a great option for building data-intensive, full-stack applications.
As we’ve shown in this two-part series, Neo4j helps you solve connected data problems with high performance and flexibility. GKE manages all of your infrastructure and gives you best-in-class cloud capabilities.
See how developers are adding graph superpowers to their applications in this white paper, How GKE and Neo4j Power Your Apps with Graphs. Click below to get your free copy.
Read the White Paper