Using the graceful shutdown approach to dispose of applications

Using the graceful shutdown approach to dispose of applications

Graceful shutdown is a process that is well stated in twelve factors; in addition to keeping applications with 🏁 fast and furious launch, we need be concerned with how we dispose of every application component. We’re not talking about classes and garbage collector. This topic is about the interruption, which could be caused by a user stopping a program or a container receiving a signal to stop for a scaling operation, swapping from another node, or other things that happen on a regular basis while working with containers. ...

October 18, 2023 · 5 min
Why and how should you use a Docker Container Health Check?

Why and how should you use a Docker Container Health Check?

In this post, I’ll show you how to use the HEALTHCHECK command to verify if your container runs properly. If you haven’t already, I strongly suggest you read the previous post about Docker build and push: How to Build and Push a Container Image HEALTHCHECK command The command tells you how to check if your container is operational. Running for you might mean running a background process, listening on a UDP, TCP, or HTTP port, or checking for an accessible file; there are several approaches to ensure your container is in good health. The next line explains command syntax: ...

June 27, 2023 · 4 min
Understanding the ELK Stack with Practical Examples

Understanding the ELK Stack with Practical Examples

This article is for those who want to learn about the ELK stack, specifically how Elasticsearch, LogStash, and Kibana communicate and what each project’s responsibilities are. When I decided to explore Elasticsearch a few years back, I was amazed with its capabilities; with the well-documented API, I had no trouble indexing my hello world documents. I was working with Apache Solr and Lucene at the time, and I recall having some trouble comprehending this stack, which was also hard to install locally. When I was comparing Elasticsearch, Solr, and Sphinx, I read that Elasticsearch indexes documents more faster than Solr + Lucene. Then I thought, huh, interesting. I encourage you do this, not to criticize projects, but to understand where the projects are suitable. ...

June 18, 2023 · 6 min
How can I add users in a Dockerfile?

How can I add users in a Dockerfile?

When containers were introduced into the game, container images with the user root were often used. Today, it is much better than in the past, but the problem persists, so we need to build an appropriate custom-based image and define a user to execute processes, to avoid security problems and limits application portability. In this post, we’ll look at how to establish a user without root privileges and use it to execute container processes. It’s essential to keep in mind that when we made these changes, we faced additional challenges, such as permissions. Root can handle anything, but normal and mortal users cannot! If you haven’t already, I strongly suggest you read the previous post about Docker build and push: ...

June 12, 2023 · 3 min
The difference between the COPY and ADD commands in a Dockerfile

The difference between the COPY and ADD commands in a Dockerfile

Transferring files from host to container image is typical while creating container images, thus we have two options for moving files or directories to the container. However, while both options may provide the same outcome, the ADD command has a different use. If you haven’t already, I strongly suggest you read the previous post about Docker build and push: How to Build and Push a Container Image COPY instruction I’ll use examples to demonstrate how the COPY command works. We often utilize copy for source code, assets, settings, and so forth… ...

June 5, 2023 · 3 min
How to Build and Push a Container Image

How to Build and Push a Container Image

Containers are changing the way we prepare environments for production and development. They are required to emulate and obtain the same responses and features which are found in the target environment. In this article, I will discuss how to build and push container images with Docker and Podman. It is important to note that both follow to the OCI Image Format Spec, thus compatibility is ensured. If you are unfamiliar with Docker, Podman or have not read the following posts, I strongly suggest you to do so. ...

May 28, 2023 · 5 min
Understanding load balancers through practical examples

Understanding load balancers through practical examples

In today’s article, we’ll discuss load balancers, a software that keeps all servers running without seeing a funny and terrible 504 error. Load balancer A network device or software that distributes incoming network traffic across multiple servers, services, or endpoints is known as a load balancer. In addition, optimize resource utilization, maximize throughput and reduces response times and ensures high availability and fault tolerance of the system. Some time ago, I worked at a company where a load balancer is a hardware device placed at a data center to provide VPS, like a tesseract “so powerful, solving all scaling problems… no 😂.” Loki and tesseract 💪🏻 Nowadays, I deal with load balancer software, and I couldn’t figure a hardware load balancer outside of cloud providers’ data centers. ...

March 28, 2023 · 6 min
Building a Squid Proxy Container to test NPM with HTTP Proxy

Building a Squid Proxy Container to test NPM with HTTP Proxy

What’s up, everyone? I’ll show you how to set up your NPM to use an HTTP proxy today. A long time ago, I had a problem at a previous job where internet access was proxied and fixed to a specific endpoint. This article is for you if you had this connection problem or if you want to use a proxy to cache some files. To put this scenario to the test, we’ll use a known caching proxy, Squid with authentication. So, make your favorite coffee ☕, and let’s get started on a kernel update. ...

March 19, 2023 · 4 min
Criando o seu primeiro Docker Container

Criando o seu primeiro Docker Container

Docker é uma plataforma de código aberto que permite aos desenvolvedores criar, publicar e executar facilmente aplicativos de forma isolada. Os containers são leves e portáteis porque suas configurações e sistema operacional são encapsulados, permitindo que sejam executados de forma consistente, independentemente da infraestrutura e respeitando sua arquitetura (x86_64, amd64 e arm). A plataforma facilita o empacotamento de um aplicativo em uma imagem de container com garantia de execução em qualquer sistema operacional compatível com o Docker. Isso significa que podemos criar um aplicativo, empacotar e garantir que ele seja executado em qualquer servidor de produção ou até mesmo seu laptop. Esse é o fim desta história… ...

March 9, 2023 · 5 min
Having a date with Kong, the most popular API gateway in the world

Having a date with Kong, the most popular API gateway in the world

As a Developer, you must consume or provide some API in whatever context you work in. You should think about how you will handle consumers, credentials, and endpoints, and keep in mind that most frameworks cannot handle these tasks easily. API Gateways were created to build, deploy, monitor, and orchestrate APIs. Of course, you could have tools or framework features to support this task list; evaluate what works best for your projects. To keep your focus on code and business, an API Gateway that handles Key-Auth, JWT, and OAuth2 security may be useful. To avoid complexity, tools, frameworks, and solutions should be used. ...

November 27, 2022 · 4 min