API Maker

The backend engine for the AI era

Playlist · 6 videos · 52 min

Performance: caching, indexes and Rust

Fast by default: automatic caching in Redis, Index Maker and automatic indexes for slow queries, API Maker measured live on a five dollar server, and more servers behind one address when one is not enough.

The videos of this playlist

  1. 5:371. Caching

    Automatic API Caching with Redis: One Setting, Under a Millisecond

    Some reads make the database do the same work again and again. One setting keeps their answers in Redis, a write drops them on its own, and a read of a table of a million rows answers in under a millisecond. See the cache key, resets from code and headers, and caching for custom APIs. 6 min 11 chapters Episode 29
  2. 9:402. Index Maker

    Index Maker: Find Slow Queries and Create the Right Index, 6 Databases

    Index Maker watches the database queries of your APIs, tells you which ones read a whole table, and gives them the right index, on six database engines. Follow one slow API on a table of a million order events: one run of its custom API in API Testing, a scanning period, query shapes, one verdict on six engines, suggestions ranked by cost, the index form, and the same call fast again. 10 min 13 chapters Episode 30
  3. 9:083. Automatic indexes

    Automatic Indexes: Index Maker Indexes Your Database on Its Own

    Indexes that find themselves: recorded, decided, written down with a reason, and created in every environment. Turn on the automatic mode of Index Maker, watch its first decision with a reason for every query, then carry its decisions to every environment with the am_index_maker migration script and the index system APIs. 9 min 11 chapters Episode 31
  4. 5:304. Why Rust

    Why Rust: API Maker Load-Tested Live on a $5 Server

    API Maker is written in Rust. Put it on the smallest server Linode sells, five dollars a month, and load it live: 1,900 requests a second from MongoDB, 9,100 from the cache, memory flat at about 51 MB, and a restart in about a tenth of a second. 6 min 12 chapters Episode 53
  5. 15:185. Built in

    HTTPS Without Caddy or Nginx: The Built-in Web Server of API Maker

    API Maker serves HTTPS itself, with no reverse proxy in front: each connection is decided once and goes straight to the API code, kernel TLS does the encryption on Linux, and certificates from Let's Encrypt renew by themselves and are shared by every server. Set it up on the Web Server page of the admin panel, the installer or API Maker Launchpad. 15 min 12 chapters Episode 83
  6. 7:036. Scale out

    Scale Out a Backend: Many API Maker Servers Behind One Load Balancer

    Two API Maker servers on the same MongoDB and Redis, behind Caddy: any server answers any call, a save is live on every server at once, WebSocket clients are told whichever server holds them, each scheduler runs once, and a server which stops hands over its clients and schedulers. Shown live, with two servers. 7 min 12 chapters Episode 73