Recently I was working on a project where one of the requirements was to include more control over the number of incoming requests to protect services from attacks and prevent resources from being overloaded and eventually crash. The solution for this was to rate limit key services in the system to secure the application from undesired requests.

In this blog, I will explain what rate limit is responsible for, why we need this in an application, and talk about the approach we used to add a centralized rate limiting service that runs on an OpenShift cluster.

What is rate-limiting?

Rate limiting is a…

When writing unit testing it is alway a good practice to mock the database with test data to achieve the F.I.R.S.T principles of unit testing.

With only a few models in an application it is not too difficult to mock the necessary test data, but when your application grows it starts to become unmanageable, for example can you image mocking data for an application with over 200 models?

A way of avoiding all the tedious work of generating all data required to test a certain method or unit of your application is taking advantage of factories, which by definition are…

Image Credit: TobiasD / Pixapay

Memory allocation is the process of reserving complete or partial space (physically or virtual) on the computer to execute an application. The management of memory on a program if not handled in the right way can make the application slow or even stop working and one of the reasons for that to happen is known in computer science as Memory Leak.

Memory leak occurs when the application allocates spaces in memory and does not release them after it be used, then the application ends up running out of memory and crashing.

Many programming languages have their approach to prevent memory…

Jose Silva

Software Engineer at @redhat

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store