Author Archives: SlowAPI

Configure Cloudflare Worker as Health Canaries

We want to know immediately when the servers are not functioning or API servers break down. We can do this easily by setting up the healthchecks in CloudFlare. It alows us to send health checks pings to the destination URLs and you can also specify the expected HTTP code, or the target response text. This Continue Reading »

Separating the Web Server from the API Server

It is always a good idea to separate the web server (normally used to host the front-end UI/site) to its APIs. This has several advantages: Avoid the Single Point of Failures If you have only 1 server that acts as both Front-end and Back-end, when the server goes down, it is down. And it is Continue Reading »

Automated WordPress Email Notification when Site is Down

Your Site is Experiencing a Technical Issue Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email. In this case, WordPress caught an error with one of your plugins, WP-Optimize – Clean, Compress, Cache. First, visit Continue Reading »

Can you generate passive incomes from making APIs?

API [API] NOUN computing a set of functions and procedures allowing the creation of applications that access the features or data of an operating system, application, or other service. TLDR; yes, but it is hard. Big Giants Unless you have a very specific domains that could generate lots of interests, most applications that could be Continue Reading »

Should You Turn Your API into Asynchronous?

When Should You Turn Your API into Asynchronous? There are a couple of cases that you should consider turning your APIs into asynchrnous: Computation-intenstive (Time-consuming) If your API is about some heavy computation which may not return shortly, you certainly want to make it asynchronous. If your API is time consuming – which is larger Continue Reading »

A little dig into asynchronous processing of Video Merger

Currently, the NodeJs Daemon queries the MySQL database for the new requests every 15 seconds. It will deal with one request at a time. In case the request takes longer than 15 seconds, and it might happen that more than 1 requests are being handled at the same time. The jobs are handled asynchronously – Continue Reading »

Remove 301 Redirects of SlowAPI.com

When SlowAPI.com launches a few weeks ago, I had 301 redirects but this is cached indefinitely by Chrome Browser. To fix this, you can F12 (or Ctrl+Shift+I) to open the dev console, and type in the following: fetch(‘https://slowapi.com’, {method: ‘post’}).then(() => {}) That will send a post request to invalidate the 301 cache. AMP Version Continue Reading »

A Glimpse into the Backend Process of Video/File Merger

The backend uses NodeJs to listen to new records in MySQL database every 15 seconds. The Process Manager is using PM2. And here is what it looks like when new requests are fetched from MySQL. 0|merger | Server responded with 404: Not Found 0|merger | cat ‘/var/www/merger/data/868_074j2xOs4’ ‘/var/www/merger/data/868_1SaNUl8hl’ ‘/var/www/merger/data/868_22bXwEuEP’ ‘/var/www/merger/data/868_3myehAtd2’ ‘/var/www/merger/data/868_48EMnMgZ1’ ‘/var/www/merger/data/868_5IMGMXJpo’ ‘/var/www/merger/data/868_6dtz EyIjl’ ‘/var/www/merger/data/868_74vZCAdZs’ Continue Reading »