Sankey — request flow.d3
Flow with volume. The best chart here for "where does it all go".
Show the source
// Sankey — where traffic actually goes.
// Node ids are strings, so `nodeId` must be set; d3-sankey defaults to
// indices and would silently mis-wire the links.
const data = {
nodes: [
{ id: 'Browser' }, { id: 'Mobile app' }, { id: 'Partner API' },
{ id: 'CDN' }, { id: 'API gateway' },
{ id: 'Orders' }, { id: 'Catalogue' }, { id: 'Payments' },
{ id: 'Postgres' }, { id: 'Redis' }, { id: 'Stripe' },
],
links: [
{ source: 'Browser', target: 'CDN', value: 620 },
{ source: 'Mobile app', target: 'API gateway', value: 410 },
{ source: 'Partner API', target: 'API gateway', value: 90 },
{ source: 'CDN', target: 'API gateway', value: 380 },
{ source: 'API gateway', target: 'Orders', value: 340 },
{ source: 'API gateway', target: 'Catalogue', value: 420 },
{ source: 'API gateway', target: 'Payments', value: 120 },
{ source: 'Orders', target: 'Postgres', value: 300 },
{ source: 'Orders', target: 'Redis', value: 40 },
{ source: 'Catalogue', target: 'Redis', value: 350 },
{ source: 'Catalogue', target: 'Postgres', value: 70 },
{ source: 'Payments', target: 'Stripe', value: 120 },