Handling Concurrent API Calls in Spring Boot

Handling Concurrent API Calls in Spring Boot

When building Spring Boot applications, handling concurrent API calls efficiently is crucial to ensure optimal performance and scalability. Here are a few approaches to manage concurrent read and write operations: Handling Concurrent Read API Calls Asynchronous Methods Using @Async at @Service annotation and enabling asynchronous processing can help handle multiple API calls concurrently. @Async public CompletableFuture<String> asyncMethod() { // Call external API return CompletableFuture.completedFuture("Result"); } WebClient with Reactor Spring WebFlux’s WebClient allows for reactive programming, making it easier to handle multiple API calls. ...

February 20, 2025 · 2 min · Özkan Pakdil
fine tune postgresql fill factor

How to fine-tune PostgreSQL fill factor

Fine tuning and optimizing the fill factor in PostgreSQL can significantly impact the performance of your database. The fill factor is a parameter that determines the percentage of a data page to be filled with rows, leaving space for future updates to minimize page splits and improve performance on frequently updated tables. By adjusting the fill factor, you can optimize storage efficiency and reduce the overhead of page splits. To fine-tune the fillfactor for tables and indexes, consider the following: ...

February 18, 2025 · 2 min · Özkan Pakdil
postgresql fill factor

What is Fill Factor in PostgreSQL

Fillfactor in PostgreSQL is a parameter that sets the percentage of a data page to be filled with rows, leaving space for future updates to minimize page splits and improve performance on frequently updated tables. If you are having a table with a lot of updates, you can set the fillfactor to a lower value to leave space for future updates. The default fillfactor is 100, which means that the table is completely packed with rows. ...

February 18, 2025 · 3 min · Özkan Pakdil
load balancing client side

What is load balancing and how to do it on client side

“Load balancing” can be explained as maintaining any workload. For example if you have to serve 1000 breakfast in the morning you can divide the work among 2-3 or more caterers to lower the delivery/preparation time. In the computer world, same logic applies, if you want to deliver fast, you can divide the work, for example for a website we can have 5-10 webserver, this way website will be delivered faster(especially during high traffic), this is server side. ...

January 9, 2025 · 2 min · Özkan Pakdil
koyeb can be java hosting service

How to find java app hosting(ISP) or How to deploy Spring Boot website to Koyeb

Spring boot is the most famous java framework, and I have been looking for a simple way to serve a java app on a hosting service(not dedicated which is very expensive not AWS/Azure which are too complicated), Most shared hosting does not support java apps, they support php or asp or perl here is the table for godaddy webhosting supported tech. I will explain how to deploy from dockerhub to Koyeb, or we can deploy from github repository too. ...

January 1, 2025 · 2 min · Özkan Pakdil