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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@stigg/sidecar

v2.236.1

Published

Stigg sidecar

Downloads

82

Readme

Stigg Sidecar Service

What does Stigg Sidecar do?

Stigg Sidecar is a tiny service that runs alongside the main application, acting as a proxy between the host and the Stigg API, while ensuring low latency entitlement checks, handles caching and provides simplified access to real-time data.

The benefits of deploying the Sidecar:

  • Less CPU consumption and memory footprint for the host application when compared to embedding the SDK directly
  • Language neutral API via Protocol Buffers and gRPC
  • Support for in-memory cache or external cache (Redis) for entitlements and usage data
  • Scaled together with the main application, or independently if deployed as a standalone service
  • Synergy with persistent-cache-service if external cache is in use
  • Easy generation of SDK clients in multiple languages, backed by well-known RPC frameworks and tools

Architecture

Architecture

Prerequisites:

  • Docker
  • Redis instance, if redis cache is used

Usage:

Login to AWS ECR:

aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/stigg

Run the service:

docker run  --rm --name stigg-sidecar --memory=1gb --cpus="1" --publish=8443:8443 \
  -e SERVER_API_KEY="<SERVER_API_KEY>" \
  public.ecr.aws/stigg/sidecar:latest

Configuration:

| Environment Variable | Type | Default | Description | |----------------------------|----------|-----------------------------|-----------------------------------------------------------------------| | SERVER_API_KEY | String* | | Environment server API key | | API_URL | String | https://api.stigg.io | Stigg API address URL | | EDGE_ENABLED | Boolean | 1 | Edge API enabled | | EDGE_API_URL | String | https://edge.api.stigg.io | Edge API URL | | WS_ENABLED | Boolean | 1 | Websocket enabled | | WS_URL | String | wss://api.stigg.io | Websocket API URL | | REDIS_ENVIRONMENT_PREFIX | String | | Identifier of the environment. If provided, Redis cache will be used. | | REDIS_HOST | String | localhost | Redis host address | | REDIS_PORT | Number | 6379 | Port of your redis | | REDIS_DB | Number | 0 | DB identifier to use when writing to Redis | | REDIS_USERNAME | String | | Redis username | | REDIS_PASSWORD | String | | Redis password | | REDIS_KEYS_TTL_IN_SECS | Number | 7 * 24 * 60 * 60 | Time for entitlements to be cached,in milliseconds | | PORT | Number | 8443 | Server port | | ENTITLEMENTS_FALLBACK | String | `` | Fallback entitlements in a JSON string format. | | HEALTH_ENDPOINT_URL | String | livez | Health endpoint URL | | READY_ENDPOINT_URL | String | readyz | Ready endpoint URL | | OFFLINE | Boolean | | Enable offline mode for local development |

*Required fields

Health:

The service exposes two endpoints:

GET /livez

Returns 200 if the service is alive.

Healthy response: {"status":"UP"}

GET /readyz

Returns 200 if the service is ready.

Healthy response: { "status": "UP" }