npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@prosopo/load-balancer

v2.11.4

Published

Provider load balancer

Readme

@prosopo/load-balancer

Provider load balancer for Procaptcha

Provider Selection Config

Each provider in the json has the following properties:

{
  address: string;      // Provider account address
  url: string;          // Provider API endpoint
  datasetId: string;    // Dataset identifier
  weight?: number;      // Optional weight (1-100, defaults to 1)
}

Weight Field

The weight field controls how often a provider is selected:

  • Range: 1-100 (values outside this range are automatically coerced)
  • Default: 1 (if not specified)
  • Type: Integer (decimal values are rounded)
  • Effect: Higher weight = more traffic

Examples

{
  "provider1": {
    "address": "...",
    "url": "https://provider1.example.com",
    "datasetId": "...",
    "weight": 1
  },
  "provider2": {
    "address": "...",
    "url": "https://provider2.example.com",
    "datasetId": "...",
    "weight": 3
  }
}

In this example:

  • Total weight = 4
  • Provider 1 receives ~25% of traffic
  • Provider 2 receives ~75% of traffic

Overriding the provider list

By default the list is fetched from provider-list.prosopo.io for staging and production, and hardcoded to a local provider for development. PROSOPO_PROVIDER_LIST replaces all of that with providers you name, in every environment.

This is what a self-hosted deployment uses. It short-circuits both halves of discovery — the /healthz call the widget makes to pick a node, and the list a verifier matches a token against — so nothing reaches Prosopo.

Two forms are accepted. One or more comma-separated URLs:

PROSOPO_PROVIDER_LIST=https://captcha1.example.com,https://captcha2.example.com

...or the same JSON shape documented above, when you want to set weights or the ipv4 / ipv6 sub-lists:

PROSOPO_PROVIDER_LIST='{"one":{"address":"5Abc...","url":"https://captcha1.example.com","datasetId":"","weight":3}}'

Notes:

  • Trailing slashes are stripped. A token embeds the provider URL it was minted against and @prosopo/server finds the issuer by exact string match, so https://host/ and https://host must not be able to disagree.
  • A malformed value is ignored and normal discovery resumes, rather than throwing. A deployment-time typo should not take down every captcha on the page — check your logs if an override seems to have no effect.
  • The bare-URL form ignores ipMode. The ipv4. / ipv6. labels are a property of Prosopo's own DNS and prefixing them onto another host would resolve to nothing. Use the JSON form's sub-lists if you run single-stack sub-zones.
  • Frontend builds bake the value in at bundle time; Node reads it at runtime.

PROSOPO_PROVIDER_URL_DEVELOPMENT still exists and still only applies when the environment is development. Prefer PROSOPO_PROVIDER_LIST, which works in a production build.