Posts

Showing posts from August, 2018

Building Simple API Gateways with Ocelot and ASP.net Core

Image
In the previous article, we've discovered what is an API gateway and the cool things that it brings. This article will demonstrate how to build a simple API gateway that routes incoming HTTP requests to the appropriate downstream services. Articles in the Series This article belongs to a series of articles that explains the importance of API gateways and how to build them using ASP.net Core. If you're interested to learn more about API gateways, it might be a good idea to spend some time reading the articles listed below. Part 1: API Gateway in a Nutshell. Part 2: Building Simple API Gateways with Ocelot. Part 3: API Response Aggregation using Ocelot Part 4: API Defense using Rate Limiting and Ocelot. Part 5: Containerizing API Gateways Part 6: Containerizing API Gateways using Alpine Base…

API Gateway in a Nutshell

Image
In this article, we will explore what are API gateways, the use-cases that you wanna solve with it and the benefits that you rip out of using them. This will be an introductory post to a series of articles that will showcase API gateway development using ASP.net Core, NodeJS and Docker. Articles in the Series This article belongs to a series of articles that explains the importance of API gateways and how to build them using ASP.net Core. If you're interested to learn more about API gateways, it might be a good idea to spend some time reading the articles listed below. Part 1: API Gateway in a Nutshell. Part 2: Building Simple API Gateways with Ocelot. Part 3: API Response Aggregation using Ocelot Part 4: API Defense using Rate Limiting and Ocelot. Part 5: Containerizing API Gateways Part 6: Containerizin…

Common NodeJS + Docker Issues

Image
This article is a list of the most common and notorious problems encountered when working with containerized NodeJS applications. It also aims to share a bunch of troubleshooting tips and tricks that you could use to diagnose and fix the issues. DISCLAIMER: This article is not a complete absolute guideline on fixing problems with NodeJS applications inside containers. If you have ideas that you want to add and share to the community, message me up @ allanchua.officefiles@gmail.com and I would gladly accept and add it in the article. Host Port is Taken Everyone hates it when the port used by their application's container is taken. Docker will throw the dreaded error above which states that the container's port is taken. You will be haunted by this issue quite often and you have several options to fix it: Kill the process / container that took the port that the container needs. If you cann…

Azure Container Registry

Image
In the previous article, we tackled Azure Container Instances Service (aka ACI) and the intricacies surrounding it. This article will present Azure Container Registry (ACR) and how it works cohesively with ACI and AKS. Goals By the end of this article, you will learn about: Some of the basic Docker components associated with Docker registries. What are container registries. What are the advantages of using private container registries What is Azure Container Registry (aka ACR). When to pick Azure Container Registry over its competitors. Docker Components Associated with Docker Registries. The diagram above presents the correlation between the basic docker concepts that you need to understand to be capable of containerizing your applications. Application - An application in the context of Containerization is a …

Azure Container Instances

Image
Today's article will explain what is Azure Container Instances Service (aka ACI). We would explore how it eases container executions on the cloud and when is it a better option in contrast to Azure Kubernetes Service and Azure Service Fabric. Goals By the end of this article, you should know: When should you pick containers over Virtual Machines.What is Azure Container Instances (ACI).When should you pick ACI over Azure Kubernetes Service and Azure Service Fabric.Why pick containers over virtual machines. Speed - Containers run on top of a host OS sharing its kernel, this results to faster boot up times. ACI can start containers in Azure in seconds, without the need to provision and manage virtual machines yourself. Incorruptibles - Unlike virtual machines, containers can quickly recover from OS or Hardware based corruptions especially in cloud provider environments. Your application ca…

10 Steps to Setup and Containerize an Express Server

Image
This article is a step by step guide on how to bootstrap and containerize an Express Server using Iron Node as a base image in 10 Easy steps. The end result of this guide is an 83 MB Image that can be used to instantiate an alpine container with express server running on port 3000. Download POC from GITHUBPre-requisites NodeJS Installed (Download Here) Express Generator (Installation Guide Here) Docker (Download Here) StepsCreate a folder Open a terminal application on your machine (CMD, BASH, ASH, etc..) an initialize NPM on the folder Install express-generator, it enables you to quickly create an express application skeleton. Bootstrap the express application skeleton Install express server dependencies Add the Dockerfile below (Name it "Dockerfile" without extension) to th…