What is the best way to build an API today? REST probably comes to mind, but if you’re going to make the investment to build new software, it’s probably worth considering a few different options and choosing the best among them. GraphQL stands out as an alternative to the REST API architecture mainly (but not only) because it provides a discoverable API by design. It also comes with its own query language and a runtime for fulfilling queries via functions called “resolvers”.
Originally developed in 2012 at Facebook as a better data-fetching solution for underpowered mobile devices, GraphQL was open-sourced in 2015. In 2018, it was moved under the care of the Linux Foundation, which maintains other important projects like Node.js, …
Nowadays, REST seems to be the default approach for building APIs, typically based on the familiar HTTP protocol. While REST is relatively simple to work with and enjoys widespread popularity, its use of multiple endpoints to address resources sometimes gets in the way of flexibility.
With such a rigid approach, some clients will get more data than they actually need (overfetching), whereas others will not get enough from a single endpoint (underfetching).
This is a common issue among endpoint-based APIs like REST, and API clients have to compensate for it — for example, by issuing multiple requests and having to do the work of bringing data into the right shape on the client side. …
Loki is an open-source, multi-tenant log aggregation system. It can be used with Grafana and Promtrail to collect and access logs, similar to the ELK/EFK stack. While one can use Kibana and Elasticsearch to make advanced data analysis and visualizations, the Loki-based logging stack focuses on being light-weight and easy to operate.
Loki provides a query language called LogQL, which allows users to query logs. It is inspired by Prometheus’ PromQL and can be considered to be a distributed “grep” that aggregates log sources.
One of the main differences to conventional logging systems is that Loki indexes just the metadata rather than the logs’ whole contents. Therefore, the index becomes smaller, which reduces memory consumption and ultimately lowers costs. One drawback of this design is that queries might be less performant than having everything indexed and loaded in memory. …
In this article, you’ll learn more about contract testing and how to use Pact to verify and ensure your Node.js microservices’ API compatibility.
The use of microservices is growing in popularity for good reasons.
They allow software teams to develop, deploy, and scale software independently to deliver business value faster. Large software projects are broken down into smaller modules, which are easier to understand and maintain.
While the internal functionality of each microservice is getting simpler, the complexity in a microservice architecture is moved to the communication layer and often requires the integration between services.
However, in microservice architectures, you often find service to service communication, leading to increased complexity in the communication layer and the need to integrate other services. …
The last decade has seen a huge rise in cloud computing. The worldwide public cloud services market is forecast to grow 17% in 2020 to total $266.4 billion, up from $227.8 billion in 2019, according to Gartner, Inc.
Cloud computing enables some of the largest companies in the world, such as Airbnb, Netflix, and Uber, to reinvent and dominate their industries.
These companies base their offerings on cloud services and take advantage of cloud native technologies in order to be faster and more adaptive than their competition. …
Kubernetes has a declarative approach to managing resources. While it’s a common practice to keep the Kubernetes manifest files in a Git repository, storing and managing Kubernetes secrets has always been a challenge. Sealed Secrets was developed to address this problem.
Sealed Secrets is a Kubernetes operator that allows you to store secrets in Git. It uses asymmetric key encryption to encrypt the secrets so that only the operator in the Kubernetes cluster can decrypt them. Therefore, the encrypted SealedSecrets are safe to store in a Git repository.
In this article, we will install the Sealed Secrets operator and demonstrate how to use it. …
If there was a way to enable your digital organization to create business value faster and increase revenue, would you do it? Most business leaders wouldn’t hesitate to answer a resounding “yes!” The last decade has given rise to just such a process, DevOps, allowing software businesses to iterate at a rapid pace and deliver business value faster than ever before. However, organizations need a way to measure that value and to show whether their initiative to adopt DevOps has been successful.
GitOps is a Kubernetes application delivery methodology. It aims to simplify the deployment and operation of Kubernetes applications.
In this article we will use Flux, which can be installed as a Kubernetes operator.
The Flux operator keeps the cluster state and a repository in sync. Any configuration change made in the repository is automatically applied to the Kubernetes cluster.
In this guide we will set up Flux and deploy a demo application via the Git repository.
To get started, we need
kubectl connected to a Kubernetes cluster and a Git repository in Gitlab.
fluxctl is a command line tool to interact with Flux. On macOS you can install
fluxctl with Homebrew. …
Application monitoring is a method that uses software tools to gain insights into your software deployments. This can be achieved through simple health checks to see if the server is available to more advanced setups where a monitoring library is integrated into your server that sends data to a dedicated monitoring service. It can even involve the client side of your application, offering more detailed insights into the user experience.
For every developer, monitoring should be a crucial part of the daily work because you need to know how the software behaves in production. You can let your testers work with your system and try to mock interactions or high loads, but these techniques will never be the same as the real production workload. …
Azure Kubernetes Service (AKS) is a managed Kubernetes offering in Azure which lets you quickly deploy a production ready Kubernetes cluster. It allows customers to focus on application development and deployment, rather than the nitty gritties of Kubernetes cluster management. The cluster control plane is deployed and managed by Microsoft while the node and node pools where the applications are deployed, are handled by the customer.
The AKS cluster deployment can be fully automated using Terraform. Terraform enables you to safely and predictably create, change, and improve infrastructure. …