Blog

Too much traffic in the proxy: how to record only your API

Of three hundred rows in traffic, forty belong to your API. The rest is analytics, maps, images and background system requests. Worse, some third-party libraries check the server certificate in their own way and stop working while traffic goes through the proxy. The “Recording” setting in Microkoi Bench decides which hosts to decrypt and save and which to pass through as is.

What extra traffic gets in the way of

  • The request you need drowns in noise, and the endpoint tree fills up with hosts that have nothing to do with you.
  • The workspace grows with other people’s response bodies and hits the size limit sooner.
  • Libraries with a pinned certificate refuse to work through decryption: the app fails somewhere other than where you’re looking.

“Recording” and “Filters” are different things

“Filters” hide already recorded exchanges in the list: remove the filter and the rows come back. “Recording” decides what gets into the workspace at all. Bench doesn’t decrypt a connection to a host that isn’t recorded: bytes flow between the app and the server as is, and nothing is saved.

That’s why libraries that check the server certificate in their own way keep working while you debug, and the workspace doesn’t fill up with unrelated traffic.

Choose a mode

ModeWhat is recordedWhen to choose it
“All hosts”All traffic through the proxyFirst look at an app
“Only selected”Only hosts from the listDebugging your own API
“All except selected”Everything except hosts from the listYou need almost everything except a couple of noisy services

Set up recording step by step

  1. In the Traffic filter bar, click the button with a dot in a frame. It shows the current rule, for example “All hosts”.
  2. In the “Recording” window, choose “Only selected”.
  3. Enter a host and click “Add”. You can paste a full address: https://api.example.com/v1/orders becomes api.example.com.
  4. Add hosts already seen in traffic with one click — they’re suggested below.
  5. Click “Save”.

A host is set by name or by mask. api.example.com means only that host. *.example.com means example.com itself and all its subdomains: api, cdn, auth. In “Only selected” mode the list can’t be empty.

Example: a delivery app

HostWhat it isRecord
api.example.comOrders, menus, addressesYes
auth.example.comSign-in and tokensYes
img.example.comDish photosNo
Analytics and mapsThird-party servicesNo

“Only selected” with the mask *.example.com won’t exclude the images: the mask catches img too. Here it’s simpler to list the two hosts you need by name.

How to tell the rule works

  • The button shows how many connections bypassed recording: “· 214 passed through”.
  • The button tooltip starts with “Recording:” and spells out the whole rule.
  • The rule applies to new connections. An app that keeps connections open follows the old rule for a while: restart it.
  • Traffic that’s already recorded isn’t deleted.

Mocks and breakpoints don’t fire on hosts that aren’t recorded. If a mock for api.example.com stays silent, first check whether that host is recorded.

The rule travels with the workspace

The recording rule is stored in the workspace folder and goes to git together with mocks and collections. A new tester who opens the workspace gets the same clean traffic right away, with no noise and no setup.

What you get

The list shows your API: forty rows instead of three hundred, an endpoint tree that fits on one screen. Third-party libraries work as they would without a proxy, and the workspace doesn’t grow with other people’s images.

Set up recording for your API in beta 0.9.6 and write to beta@microkoi.com about the hosts you exclude most often. We read every email.

Microkoi BenchTraffic analysis and debuggingHTTP and HTTPS, decrypted

Try it on your own project

The beta is free and needs no sign-up. Download it, pick your project folder and start the proxy — your first requests will show up within minutes.

Version 0.9.6 · macOS, Windows and Linux · no sign-up