Add backup hostnames to API endpoints

Created on 2 June 2024, 7 months ago

Problem/Motivation

Sometimes there are problems with internet connections. It happens. Maybe server has issues, maybe visitor's ISP has issues.

Proposed resolution

In case main API host cannot be reached, Iconify public API has backup host names:

https://api.simplesvg.com
https://api.unisvg.com

Each of backup host names points to half of API servers. For example, in western Europe there are currently 2 servers: in Frankfurt and in London. Main host points to both, one of backup hosts points to server in Frankfurt, another backup host points to server in London. If server in Frankfurt goes down, users that are using that server can be redirected to server in London using one of backup host names.

Redundancy built in Iconify icon components accounts for that. It tries to connect to main host first, then, if there was no response in reasonable time (timeout is 0.75 seconds), it attempts to connect to one of backup hosts, then to another backup host. Small delay caused by check only affects first query, all further API queries are sent to host that responded.

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇪🇸Spain gxleano Cáceres

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024