An optimized backend API
menu
telegram telegram
Contact me

An optimized backend API

I was given a task to create a highly performance-efficient backend API for an app that allows communication among coworkers.

In order to do so, I used Symfony and PostgreSQL as the backend stack.

I decided to follow the CQRS principle and create separate sides for writing and reading.

For the write side, I used an asynchronous flow. Every incoming request pushed a command into the message component via a message broker, which then invoked a specific handler to perform business logic and update optimized views.

The read side was optimized for consumers. I created specialized views that were updated dynamically, and their structure was also optimized for fast reads. The read side exposed different API styles: some endpoints were available via WebSockets, some via REST, and for certain features I used Server-Sent Events (SSE).

As a result, I built a lean backend application that performed very fast.