---
title: "Shopify Engineering (hard)"
description: "Posts from Shopify Engineering on swe.quest."
url: "https://swe.quest/sources/shopify?difficulty=hard"
---

# Shopify Engineering (hard)

Posts from [Shopify Engineering](https://shopify.engineering), newest first.

Posts 1–16 of 16, page 1 of 1, newest first.

## 2026-11-11

- [Shopify’s generative discovery model](https://swe.quest/articles/shopify-s-generative-discovery-model-99e5ac502d9a8c68.md): Shopify Engineering · 2026-11-11 · Hard · 12 min read · Recommendations & ranking, Search, LLMs, Inference & serving, Model training
  Shopify trained a single generative model, adapted from an open-weight LLM, that emits semantic-ID tokens to generate product candidates for both personalized search and recommendation across a catalog of billions.

## 2026-10-21

- [How Shopify turns open models into task experts](https://swe.quest/articles/how-shopify-turns-open-models-into-task-experts-a2ba67e222beb92b.md): Shopify Engineering · 2026-10-21 · Hard · 5 min read · Model training, Inference & serving, Evaluation, AI agents, Cost optimization
  Shopify's Sidekick keeps a frontier model for merchant conversation and planning but offloads token-heavy subagent work, such as GraphQL query generation, to open models it post-trains and self-hosts.

## 2026-10-20

- [Cross-store product clustering across millions of stores](https://swe.quest/articles/cross-store-product-clustering-across-millions-of-stores-c9b1fdcfbed466c6.md): Shopify Engineering · 2026-10-20 · Hard · 13 min read · Machine learning, E-commerce, Vector search, Algorithms, LLMs
  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.

## 2026-08-19

- [Gisting: Compressing LLM Agent context to ↑ throughput and ↓ cost](https://swe.quest/articles/gisting-compressing-llm-agent-context-to-throughput-and-cost-77b1a192c9e3be28.md): Shopify Engineering · 2026-08-19 · Hard · 5 min read · Inference & serving, LLMs, Model training, Cost optimization, Performance engineering
  Shopify compressed the ~6,000-token system prompt of its Sidekick GraphQL agent into ~1,500 learned gist tokens (4:1) without losing prediction quality.

## 2026-08-05

- [Sidekick's continual learning loop](https://swe.quest/articles/sidekick-s-continual-learning-loop-f72e46000910fa09.md): Shopify Engineering · 2026-08-05 · Hard · 9 min read · Model training, Evaluation, Inference & serving, LLMs, Cost optimization
  Shopify's Sidekick GraphQL agent improves daily through a continual learning loop that turns production failures into model weight updates, beating frontier-model quality while cutting estimated serving costs from about $27M to $1M per year (96%).

## 2026-03-12

- [Shopify’s journey to faster breadth-first GraphQL execution](https://swe.quest/articles/shopify-s-journey-to-faster-breadth-first-graphql-execution-83f0f58b8c4dabd1.md): Shopify Engineering · 2026-03-12 · Hard · 14 min read · GraphQL, Performance engineering, Ruby, Query engines
  Shopify built GraphQL Cardinal, a breadth-first GraphQL execution engine that calls each field resolver once with the full set of objects at that level instead of once per object.

## 2026-02-27

- [2,000 robots walk into a shop...](https://swe.quest/articles/2-000-robots-walk-into-a-shop-197e6155a91a1c15.md): Shopify Engineering · 2026-02-27 · Hard · 8 min read · Inference & serving, AI agents, LLMs, Performance engineering, Hardware
  SimGym runs simulated A/B tests on Shopify storefronts by sending up to 2,000 concurrent LLM-driven shopper agents through Browserbase cloud browsers.

## 2026-02-25

- [The generative recommender behind Shopify's commerce engine](https://swe.quest/articles/the-generative-recommender-behind-shopify-s-commerce-engine-f5ed1bac0cf956d4.md): Shopify Engineering · 2026-02-25 · Hard · 8 min read · Recommendations & ranking, Model training, Machine learning, E-commerce
  Shopify built a foundational generative recommender on HSTU that treats buyer journeys as raw event sequences and trains an autoregressive, causally masked model to predict the next product.

## 2023-07-18

- [Contributing support for a Wasm instruction to Winch](https://swe.quest/articles/contributing-support-for-a-wasm-instruction-to-winch-3a4d14391ef1d680.md): Shopify Engineering · 2023-07-18 · Hard · 9 min read · WebAssembly, Compilers, Rust, Testing, Open source
  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.

## 2023-04-06

- [Adventures in Garbage Collection: Improving GC Performance in our Massive Monolith](https://swe.quest/articles/adventures-in-garbage-collection-improving-gc-performance-in-our-massive-7c8cc3e83e915743.md): Shopify Engineering · 2023-04-06 · Hard · 13 min read · Memory management, Ruby, Performance engineering, Runtimes & VMs
  Shopify cut Ruby garbage-collection tail latency in its monolith by finding why major GCs were triggered, via GC.latest\_gc\_info(:major\_by), and removing each cause in turn.

## 2022-12-25

- [Optimizing Ruby’s Memory Layout: Variable Width Allocation](https://swe.quest/articles/optimizing-ruby-s-memory-layout-variable-width-allocation-7db49cee151f4d44.md): Shopify Engineering · 2022-12-25 · Hard · 13 min read · Memory management, Ruby, Runtimes & VMs, Performance engineering
  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.

## 2022-07-15

- [Spin Infrastructure Adventures: Containers, Systemd, and CGroups](https://swe.quest/articles/spin-infrastructure-adventures-containers-systemd-and-cgroups-5a9e742638fea62c.md): Shopify Engineering · 2022-07-15 · Hard · 8 min read · Containers, Linux, Kubernetes, Debugging, Multi-tenancy
  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.

## 2022-04-14

- [Code Ranges: A Deeper Look at Ruby Strings](https://swe.quest/articles/code-ranges-a-deeper-look-at-ruby-strings-b87e06d5cb44fa84.md): Shopify Engineering · 2022-04-14 · Hard · 14 min read · Ruby, Runtimes & VMs, Data structures, Performance engineering
  Ruby strings are mutable and encoding-aware across 100+ encodings, so runtimes cache a per-string "code range" (UNKNOWN, 7BIT, VALID, BROKEN) to avoid repeated O(n) validity scans.

## 2021-12-02

- [Upgrading MySQL at Shopify](https://swe.quest/articles/upgrading-mysql-at-shopify-bb0f87b54fe985d5.md): Shopify Engineering · 2021-12-02 · Hard · 16 min read · MySQL, Replication, Debugging, Deployment, Cloud platforms
  Shopify moved hundreds of horizontally sharded Percona Server shards, thousands of VMs in all, from 5.7.21 to 5.7.32, mainly to get writeset-based replication parallelism across replication topologies up to four hops deep.

## 2021-11-11

- [Using Propensity Score Matching to Uncover Shopify Capital’s Effect on Business Growth](https://swe.quest/articles/using-propensity-score-matching-to-uncover-shopify-capital-s-effect-on-business-8bb147b3b69bd1fb.md): Shopify Engineering · 2021-11-11 · Hard · 10 min read · Machine learning, Analytics & OLAP, Payments & fintech
  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.

## 2021-10-21

- [Debugging Systems in the Cloud: MySQL, Kubernetes, and Cgroups](https://swe.quest/articles/debugging-systems-in-the-cloud-mysql-kubernetes-and-cgroups-a5ded3f862ca5b21.md): Shopify Engineering · 2021-10-21 · Hard · 8 min read · Debugging, Linux, MySQL, Kubernetes, Performance engineering
  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.

Same list as RSS: [https://swe.quest/feed.xml?source=shopify&difficulty=hard](https://swe.quest/feed.xml?source=shopify&difficulty=hard). Lists take `?page=`, `?per=12|24|48|96` and, on the home page, `?tag=` (up to 3), `?source=`, `?difficulty=easy|medium|hard` and `?search=`.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
