When we’re encrypting data, typically we will create a random key that is able to decrypt that data. In some specific cases one wants to use a user specified key to decrypt that data like a password. However, the key that is used for cryptographic algorithms typically needs to be at least 32 bytes. But, it is likely that our password won’t make that criteria, so we need to have a solution for that. Recently, I needed such a method, and in this post I’ll lay out what I’ve done in order to solve it. …
In this post I’ll give a quick overview of several methods you can use for profiling/debugging Go applications that are running in a docker container. To get a more in-depth overview of the several methods, I’ve added the source links you can reference at the end of the post. I really advise you to read the sources listed, and read up on how to use and interpret the created profiles in order to debug/optimize your application. This post aims to help you to create those profiles when using a Docker container to run your Go applications. …
In the following post I’ll explain how you can profile a running Python program in a Docker container using py-spy.
py-spy is able to generate flame graphs, and it can give us profiling capabilities in order to debug our Python programs. Now, when your Python code is running in a Docker container it can be a bit more difficult to profile your code, and this post sets out to show you how this can be done with these tools.
NOTE: This post has been updated and you can view its updated version here
In this post I’ll give a quick overview of several methods you can use for profiling/debugging Go applications that are running in a docker container. To get a more in-depth overview of the several methods, I’ve added the source links you can reference.
When you want to use pprof to profile your Go applications, that are running in a container, we need to make sure we turn on the internal pprof HTTP endpoints. We’ll do this by updating the source code of your application. …
In this post I will set out on how to set up a Django project that can be used as a REST API microservice. To see the end result, you can investigate the code here. An important disclaimer: the code presented here is to be used in a development environment, review security practices for the framework(s) when you want to use it in production or expose it to the internet.
We will be using the following stack:
| Name | Version |
| Docker | 18.03.1-ce |
| Python | 3.8 |
| Django | 2.2.7 |
| PostgreSQL | 12.0 |
| Gunicorn | 20.0.0 |
| DRF | 3.10.3 …