• A Brief Introduction to Pagination

    For many software engineers, endpoints for retrieving a list of entities are probably their favorite to implement–all they need to do is build an SQL statement that grabs all the available items, along with some other minor tasks. It’s all fun and games until the number of entities in the database becomes a bottleneck, where each GET request returns tens of thousands of items. You start to see server-side logs bombarded with error messages highlighted in red. Your dear users, previously satisfied with your application, begin to complain about the increasingly lackluster performance. Your product manager is on the brink of losing it and taking out their frustration on you. What?! You say you want to prevent all this from happening? Pagination is what you need! It can drastically improve your endpoints’ performance and save your servers from overload. Today, I will define pagination and introduce the most common pagination techniques.

    ...