Payments ledger

2024

Fernhill Pay

A payments ledger for 9,000 small shops. One codebase from the till to the back office.

Checkout, 95th percentile

was 840 ms in January 2024

Client

Fernhill, Edinburgh

Role

Lead engineer, interface and API

Timeline

Ten weeks, 2024

Built with

React, TypeScript, Go, Postgres

Fernhill Pay settlements screen: a total settled today, a bar chart of volume by half hour and a table of payments

The problem

The problem

Checkout took 840 ms at the 95th percentile, and nobody could say where the time went. Shops with slow connections were giving up at the card step.

Checkout took 840 ms at the 95th percentile, and nobody could say where the time went. Shops with slow connections were giving up at the card step.

What I did

What I did

I traced one payment end to end before touching anything. Two thirds of the time was three lookups the ledger already had the answers to. I moved them into the write path, added one index and deleted a cache.

I traced one payment end to end before touching anything. Two thirds of the time was three lookups the ledger already had the answers to. I moved them into the write path, added one index and deleted a cache.

What changed

What changed

Checkout now sits at 96 ms. The dashboards I used are part of the product, so the team sees a regression the day it ships.

Checkout now sits at 96 ms. The dashboards I used are part of the product, so the team sees a regression the day it ships.

The same screen, three widths. Scroll to fold it down.

Fernhill Pay settlements screen: a total settled today, a bar chart of volume by half hour and a table of payments

Fernhill Pay

Checkout at 96 ms, was 840

Role
Lead engineer, interface and API
Year
2024
Built with
React, TypeScript, Go, Postgres
Result
Checkout at 96 ms, was 840

The same screen, three widths. Scroll to fold it down.

Fernhill Pay settlements screen: a total settled today, a bar chart of volume by half hour and a table of payments

Fernhill Pay

Checkout at 96 ms, was 840

Role
Lead engineer, interface and API
Year
2024
Built with
React, TypeScript, Go, Postgres
Result
Checkout at 96 ms, was 840

The same screen, three widths. Scroll to fold it down.

Fernhill Pay settlements screen: a total settled today, a bar chart of volume by half hour and a table of payments

Fernhill Pay

Checkout at 96 ms, was 840

Role
Lead engineer, interface and API
Year
2024
Built with
React, TypeScript, Go, Postgres
Result
Checkout at 96 ms, was 840

Next project

Next project

Harbourline

Harbourline

Have a number that needs moving? Tell me what it is today.

Next free in January 2027. Send the number, where it is measured, and what it costs you. I reply within a day.

Next free in January 2027. Send the number, where it is measured, and what it costs you. I reply within a day.

Create a free website with Framer, the website builder loved by startups, designers and agencies.