Scalability Essentials for APIs in High-Traffic Services

When developing APIs for services in a company with a large user base, scalability becomes a critical consideration. Scaling an API in production for such a company requires keeping certain fundamentals in mind. Today, I’ll discuss a few key points that you should also keep in mind when approaching this challenge. Here’s a breakdown of some key techniques and strategies you can use: API Optimizations Reduce Payload Size: Send only the necessary data in responses and avoid including unnecessary properties, as every byte contributes to network overhead, even if it’s just a single byte. ...

November 20, 2024 · 6 min · Saddam H

Generate API Documentation Easily with Docgen: A Simple, Open-Source Tool

In this tutorial, I’ll introduce you to an open-source tool that can help you create awesome API documentation effortlessly! If you’re working with REST APIs and exposing them through HTTP/JSON, chances are you’re already using Postman to test, debug, and manage collections. When collaborating with teams—especially with Android or iOS developers—you often need to share your API documentation. Typically, this involves sharing the Postman collection in JSON format along with handwritten documentation to describe the API. ...

May 15, 2020 · 2 min · Saddam H

Build RESTful API service in golang using gin-gonic framework

Today I’m going to build a simple API for todo application with the golang programming language. I’m going to use golang simplest/fastest framework gin-gonic and a beautiful ORM gorm for our database work. To install these packages go to your workspace $GOPATH/src and run these command below: $ go get gopkg.in/gin-gonic/gin.v1 $ go get -u github.com/jinzhu/gorm $ go get github.com/go-sql-driver/mysql In generic crud application we need the API’s as follows: ...

November 12, 2017 · 5 min · Saddam H

How to customize Laravel request throttle message in API response?

When you are using laravel api, then you must use throttling to protect your api from scrapping or any other attack. When you are limiting your api using laravel throttle then you get a html response message containing “Too Many Attempts.” In order to change the message in a custom format and json reponse follow the steps below: Create a new file ThrottleRequestsMiddleware.php in __ app/Http/Middleware/__ and paste the code below: ...

August 21, 2016 · 3 min · Saddam H