Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/server-core/_sampleApp.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> 💡 **Tip:** Get started quickly with one of our [sample apps](https://github.com/statsig-io/statsig-server-core/tree/main/examples)!
17 changes: 12 additions & 5 deletions docs/server-core/dotnetCoreSDK.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import {
HOOK__SDKDocUpdate,
} from "../sdks/_SDKDocsBuilder.mdx";

import SampleTipText from "./_sampleApp.mdx";

import * as _Notes from "./dotnet-core/_notes.mdx";
export const Notes = _Notes;

import Install from "./dotnet-core/_install.mdx"
import Initialize from "./dotnet-core/_initialize.mdx"
import Install from "./dotnet-core/_install.mdx";
import Initialize from "./dotnet-core/_initialize.mdx";
import CheckGate from "./dotnet-core/_checkGate.mdx";
import GetFeatureGate from "./dotnet-core/_getFeatureGate.mdx";
import GetConfig from "./dotnet-core/_getConfig.mdx";
Expand Down Expand Up @@ -91,11 +93,16 @@ export const Builder = SDKDocsBuilder({
LocalOverridesSection,
{ addedInVersion: "1.0.0", snippet: <LocalOverrides /> },
],
[ManualExposuresSection, { addedInVersion: "1.0.0", snippet: <ManualExposures /> }],
[
ManualExposuresSection,
{ addedInVersion: "1.0.0", snippet: <ManualExposures /> },
],
[Notes, {}],
]
],
});

export const toc = Builder.toc
<SampleTipText />

export const toc = Builder.toc;

<>{Builder.result}</>
23 changes: 12 additions & 11 deletions docs/server-core/elixir-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
HOOK__SDKDocUpdate,
} from "../sdks/_SDKDocsBuilder.mdx";

import SampleTipText from "./_sampleApp.mdx";

import {
Repository,
GettingStarted,
Expand All @@ -24,10 +26,9 @@ import {
PersistentStorage,
DataStore,
OutputLogger,
ObservabilityClient
ObservabilityClient,
} from "./Templates/index.mdx";


import Preamble from "./_preamble.mdx";
import Install from "./elixir/_install.mdx";
import Initialize from "./elixir/_initialize.mdx";
Expand All @@ -40,7 +41,6 @@ import MoreFAQs from "./elixir/_faqs.mdx";
import Options from "./elixir/_options.mdx";
import ShutdownSnippet from "./elixir/_shutdown.mdx";


export const Builder = SDKDocsBuilder({
sections: [
[
Expand Down Expand Up @@ -72,15 +72,16 @@ export const Builder = SDKDocsBuilder({
[StatsigUser, {}],
[StatsigOptions, { options: <Options /> }],
[Shutdown, { shutdown: <ShutdownSnippet /> }],
[PersistentStorage, { }],
[DataStore, { }],
[OutputLogger, { }],
[ObservabilityClient, { }],
[PersistentStorage, {}],
[DataStore, {}],
[OutputLogger, {}],
[ObservabilityClient, {}],
[FAQ, { faqs: <MoreFAQs /> }],
]
})
],
});

export const toc = Builder.toc
<SampleTipText />

<>{Builder.result}</>
export const toc = Builder.toc;

<>{Builder.result}</>
21 changes: 12 additions & 9 deletions docs/server-core/go-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
HOOK__SDKDocUpdate,
} from "../sdks/_SDKDocsBuilder.mdx";

import SampleTipText from "./_sampleApp.mdx";

import {
Repository,
GettingStarted,
Expand Down Expand Up @@ -75,19 +77,20 @@ export const Builder = SDKDocsBuilder({
},
],
[ManualExposures, { ...ManualExposureSnippets }],
[StatsigUser, { }],
[StatsigUser, {}],
[StatsigOptions, { options: <Options /> }],
[Shutdown, { shutdown: <ShutdownSnippet />, flush: <Flush /> }],
[LocalOverrides, { snippet: <LocalOverridesSnippet /> }],
[PersistentStorage, { }],
[DataStore, { }],
[OutputLogger, { }],
[ObservabilityClient, { }],
[PersistentStorage, {}],
[DataStore, {}],
[OutputLogger, {}],
[ObservabilityClient, {}],
[FAQ, { faqs: <MoreFAQs /> }],
]
})
],
});

export const toc = Builder.toc
<SampleTipText />

<>{Builder.result}</>
export const toc = Builder.toc;

<>{Builder.result}</>
25 changes: 15 additions & 10 deletions docs/server-core/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,45 @@ last_update:
date: 2025-09-18
---

import SampleTipText from "./_sampleApp.mdx";

## Statsig Server Core

Statsig Server Core is our second generation of Server SDKs: a full rewrite with a shared, performance-focused core library that enables superior across-the-board perf and feature maturity across our Server SDKs. Server Core SDKs include:

- **Faster Evaluation:** A shared, performance-focused Rust evaluation engine, that evaluates 3-5x as our pure native code SDKs.
- **Superior non-eval performance:** more efficient network and CPU usage, plus other performance optimizations always arriving to each SDK.
- **Features new to Server SDKs:** Parameter Stores, Contextual Multi-Armed Bandits, and more.
- **Superior non-eval performance:** more efficient network and CPU usage, plus other performance optimizations always arriving to each SDK.
- **Features new to Server SDKs:** Parameter Stores, Contextual Multi-Armed Bandits, and more.
- **Quality-of-life improvements from certain SDKs:** Observability Interface, streaming config changes (from the Statsig Forward Proxy) and more

### Availability across SDKs

Server Core SDKs are available on an opt-in basis, with native SDKs still available and supported in all languages. If you're just getting started with Statsig, we recommend choosing a Server Core SDK if its convenient for you, but we continue to support bug fixes in our [Legacy SDKs](/server-core/legacy-sdks), and will until we set end-of-support dates for these SDKs. At that time - we'll also provide guidance to make migration as easy as possible.
Server Core SDKs are available on an opt-in basis, with native SDKs still available and supported in all languages. If you're just getting started with Statsig, we recommend choosing a Server Core SDK if its convenient for you, but we continue to support bug fixes in our [Legacy SDKs](/server-core/legacy-sdks), and will until we set end-of-support dates for these SDKs. At that time - we'll also provide guidance to make migration as easy as possible.

<SampleTipText />

- **[Node](./node-core)**: Stable, [npm](https://www.npmjs.com/package/@statsig/statsig-node-core)
- **[Python](./python-core)**: Stable, [PyPI](https://pypi.org/project/statsig-python-core/)
- **[Java](./java-core)**: Stable, [Maven Central](https://central.sonatype.com/artifact/com.statsig/javacore/overview)
- **[PHP](./php-core)**: Stable, [Packagist](https://packagist.org/packages/statsig/statsigsdk)
- **[Rust](./rust-core)**: Stable, [Crates.io](https://crates.io/crates/statsig-rust)
- **[Elixir](./elixir-core)**: Stable
- **[.NET](./dotnetCoreSDK)**: Beta
- **Ruby**: In Development, planned for Summer 2025
- **[.NET](./dotnetCoreSDK)**: Stable
- **Ruby**: In Development, planned for Late 2025
- **[Go](./go-core)**: Beta
- **C#**: In Development, planned for Summer 2025

### Technical differences

**Build process:** Statsig Server Core uses a core library written in Rust, with bindings written to other languages. In the vast majority of cases, this results in an unchanged development experience with superior performance, but given that the Rust code must compile into a binary usable in your development and deployment environments, some development snafus exist:
- **Choosing the right build:** In most cases, the SDK's package manager will automatically install the versions you need. The notable exception is in Java - where our SDK will print out the right build for you, if it's not included at runtime.
- **Managing lockfiles:** If your deployment and development environments require different builds (as is common), you'll want to include both versions in a lockfile like package-lock.json.
- **Untested environments:** Certain environments, like the edge, aren't friendly to this new build process - and for now, we recommend using our [native SDKs](/server-core/legacy-sdks) for the time being.

- **Choosing the right build:** In most cases, the SDK's package manager will automatically install the versions you need. The notable exception is in Java - where our SDK will print out the right build for you, if it's not included at runtime.
- **Managing lockfiles:** If your deployment and development environments require different builds (as is common), you'll want to include both versions in a lockfile like package-lock.json.
- **Untested environments:** Certain environments, like the edge, aren't friendly to this new build process - and for now, we recommend using our [native SDKs](/server-core/legacy-sdks) for the time being.

**New Configuration Spec:** Server Core uses a smaller "ruleset", or configuration spec. If you use the spec directly, your logic and parsing will have to change.

**Event Logging**
Server core SDKs, starting in v0.4.0+, have a new event logging architecture. This is designed to stream events freely to statsig servers during normal operation, and throttle/drop events SDK side during outages on the event logging endpoint to enable the service to spin up healthy before processing steady-state qps. We expose the following parameters to tune this implementation
Server core SDKs, starting in v0.4.0+, have a new event logging architecture. This is designed to stream events freely to statsig servers during normal operation, and throttle/drop events SDK side during outages on the event logging endpoint to enable the service to spin up healthy before processing steady-state qps. We expose the following parameters to tune this implementation

```
- event_logging_max_queue_size: Controls batch size (default 2000). Note that exceeding the backend request size limit (10MB) will drop requests
Expand Down
50 changes: 31 additions & 19 deletions docs/server-core/java-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
HOOK__SDKDocUpdate,
} from "../sdks/_SDKDocsBuilder.mdx";

import SampleTipText from "./_sampleApp.mdx";

import {
Repository,
GettingStarted,
Expand All @@ -30,7 +32,7 @@ import {
DataStore,
OutputLogger,
ObservabilityClient,
FieldsNeededMethods
FieldsNeededMethods,
} from "./Templates/index.mdx";

import Preamble from "./_preamble.mdx";
Expand All @@ -57,7 +59,6 @@ import ObservabilityClientContent from "./java/_observability_client.mdx";
import SharedInstanceSnippet from "./java/_sharedInstance.mdx";
import DataStoreContent from "./java/_data_store.mdx";


export const Builder = SDKDocsBuilder({
sections: [
[
Expand Down Expand Up @@ -92,27 +93,38 @@ export const Builder = SDKDocsBuilder({
[StatsigUser, { statsigUser: <UserSnippet /> }],
[StatsigOptions, { options: <Options /> }],
[Shutdown, { shutdown: <ShutdownSnippet />, flush: <Flush /> }],
[LocalOverrides, { snippet: <OverridesSnippet />,},],
[PersistentStorage, { }],
[LocalOverrides, { snippet: <OverridesSnippet /> }],
[PersistentStorage, {}],
[DataStore, { content: <DataStoreContent /> }],
[OutputLogger, { }],
[OutputLogger, {}],
[ObservabilityClient, { content: <ObservabilityClientContent /> }],
[FAQ, {
faqs: <>
<MoreFAQs />
<h3 id="java-core-vs-legacy-java-sdk">Java Core vs Legacy Java SDK</h3>
<CoreVsLegacyContent />
<h3 id="supported-os-and-architecture-combinations">Supported OS and Architecture Combinations</h3>
<SupportedCombinationsContent />
<h3 id="example-program">Sample App</h3>
<ExampleProgramContent />
</>
}],
[
FAQ,
{
faqs: (
<>
<MoreFAQs />
<h3 id="java-core-vs-legacy-java-sdk">
Java Core vs Legacy Java SDK
</h3>
<CoreVsLegacyContent />
<h3 id="supported-os-and-architecture-combinations">
Supported OS and Architecture Combinations
</h3>
<SupportedCombinationsContent />
<h3 id="example-program">Sample App</h3>
<ExampleProgramContent />
</>
),
},
],
[Reference, { snippets: <ReferenceSnippets.default /> }],
[FieldsNeededMethods, {}],
]
})
],
});

<SampleTipText />

export const toc = Builder.toc
export const toc = Builder.toc;

<>{Builder.result}</>
4 changes: 4 additions & 0 deletions docs/server-core/node-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
HOOK__SDKDocUpdate,
} from "../sdks/_SDKDocsBuilder.mdx";

import SampleTipText from "./_sampleApp.mdx";

import {
Repository,
GettingStarted,
Expand Down Expand Up @@ -110,6 +112,8 @@ export const Builder = SDKDocsBuilder({
],
});

<SampleTipText />

export const toc = Builder.toc;

<>{Builder.result}</>
27 changes: 15 additions & 12 deletions docs/server-core/php-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
HOOK__SDKDocUpdate,
} from "../sdks/_SDKDocsBuilder.mdx";

import SampleTipText from "./_sampleApp.mdx";

import {
Repository,
GettingStarted,
Expand All @@ -26,7 +28,7 @@ import {
DataStore,
OutputLogger,
ObservabilityClient,
CustomAdapters
CustomAdapters,
} from "./Templates/index.mdx";

import Preamble from "./_preamble.mdx";
Expand Down Expand Up @@ -69,19 +71,20 @@ export const Builder = SDKDocsBuilder({
hideAsyncDisclaimer: true,
},
],
[StatsigUser, { }],
[StatsigUser, {}],
[StatsigOptions, { options: <Options /> }],
[CustomAdapters, { }],
[CustomAdapters, {}],
[Shutdown, { shutdown: <ShutdownSnippet />, flush: <Flush /> }],
[PersistentStorage, { }],
[DataStore, { }],
[OutputLogger, { }],
[ObservabilityClient, { }],
[FAQ, { }],
]
})
[PersistentStorage, {}],
[DataStore, {}],
[OutputLogger, {}],
[ObservabilityClient, {}],
[FAQ, {}],
],
});

export const toc = Builder.toc
<SampleTipText />

<>{Builder.result}</>
export const toc = Builder.toc;

<>{Builder.result}</>
4 changes: 4 additions & 0 deletions docs/server-core/python-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
HOOK__SDKDocUpdate,
} from "../sdks/_SDKDocsBuilder.mdx";

import SampleTipText from "./_sampleApp.mdx";

import {
Repository,
GettingStarted,
Expand Down Expand Up @@ -119,6 +121,8 @@ export const Builder = SDKDocsBuilder({
],
});

<SampleTipText />

export const toc = Builder.toc;

<>{Builder.result}</>
Loading