Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Sources

Shopify Engineering

2026

Cross-store product clustering across millions of stores

Case study 13 min +130 XP

Shopify groups listings of the same product across millions of stores under a global Universal Product Identifier using a three-stage pipeline: embedding-based approximate nearest-neighbor retrieval to find candidate pairs, tiered pair scorers, and graph clustering.

2023

Contributing support for a Wasm instruction to Winch

How-to 9 min +90 XP

Adding a WebAssembly instruction to Winch, Wasmtime's baseline non-optimizing compiler, touches several layers: the wasmparser VisitOperator visitor, the CodeGenContext that manages the value stack, register allocation and spilling, an ISA-independent MacroAssembler, and an x86_64 assembler built on Cranelift's ISLE-generated instruction definitions.

2022

Optimizing Ruby’s Memory Layout: Variable Width Allocation

Deep dive 13 min +130 XP

Ruby 3.2's Variable Width Allocation replaces CRuby's single 40-byte RVALUE slot with five size pools (40, 80, 160, 320 and 640 bytes) so classes, strings, arrays and objects can store their data adjacent to the object instead of in separate malloc'd memory.

Spin Infrastructure Adventures: Containers, Systemd, and CGroups

Incident 8 min +80 XP

Spin development instances run systemd inside Kubernetes containers, and processes launched through systemd escaped the pod's memory cgroup, so pod memory limits were not enforced and instances could exceed their allotment and disturb neighbours.

2021

Using Propensity Score Matching to Uncover Shopify Capital’s Effect on Business Growth

Research 10 min +100 XP

Shopify estimated the causal effect of Shopify Capital on merchant sales using propensity score matching, treating US first-time Capital adopters in January 2019 as the treatment group and Canadian shops that later pre-qualified (when Capital wasn't yet available in Canada) as the control.

Debugging Systems in the Cloud: MySQL, Kubernetes, and Cgroups

Incident 8 min +80 XP

Slow MySQL Pod startup and degraded query performance on long-running GKE nodes in Shopify's KateSQL platform traced back to a Linux kernel memory cgroup leak: roughly 50K zombie memory cgroups made mem_cgroup_commit_charge slow, so each 128MB mmap during InnoDB buffer pool initialization took about 100 ms. The investigation used strace, perf flamegraphs, slabtop and /proc/cgroups, and Google kernel engineers confirmed it as a side effect of slab reparenting on cgroup removal.

The quest for software engineering knowledge.

Look:
Layout: