Client-Side and Server-Side SDKs

Updated 1 day ago by Archana Singh

Harness Feature Flag provides several SDKs in different languages to help you access feature flags from your applications. The SDKs are divided into two main categories, regardless of the programming language:

  • Client-side SDKs
  • Server-side SDKs

The client and server-side SDKs have different security considerations as well as some behavioral and architectural differences. This topic will help you understand the difference between Harness Feature Flag's client-side and server-side SDKs.

In this topic:

SDK Types

The following table lists the differences between the client-side and server-side SDKs with respect to type of users, security, storage, connection state, and operation.

Parameter

Client Side SDK

Server Side SDK

Users

Designed to be used in applications, your users run directly on their own devices, such as mobile, desktop, and web applications.

Optimized to be used by a single user and low bandwidth consumption.

Examples: JavaScript, iOS, Android, React Native SDKs.

 

Designed to be used in server-side applications such as web servers and backend services.

Optimized to be used in multi-user and secure environments.

Examples, Java, Go, and Python SDKs.

Security

The SDKs are embedded in your applications and run on the browser or on mobile devices. Because of which these SDKs can be compromised by users when unpacking a mobile app or using the browser's developer tools to inspect the page. You should not use a server-side SDK key in client-side applications.

Client-side SDKs only perform an evaluation of a flag and receive the result.  They don't store all data about a flag.

The SDKs are embedded in applications that run on your servers such as web servers or backend servers. These environments are comparatively safe.

Server-side SDKs download all the feature flags that you have defined in a project and store them in memory.

Storage

Client-side SDk has a local cache. It communicates with Harness more often

Server-side SDKs downloads and caches all flag rules and states and avoids most Harness communication

Connection state

Client-side SDKs require a consistent connection to establish an evaluation decision.

Server-side SDKs can make an evaluation decision based on locally stored rules once instantiated. It requires a connection to pull or receive updates

Operation

Feature evaluation happens on the server-side, and SDK only gets the evaluated results of the Flags.

Server SDKs sync Flag rulesets in the background and keep in-memory cache. When an application makes the call for Flag value, the evaluation happens locally, and no network call is made. Hence it is very fast and efficient.

Supported Application Types

Client-Side SDKs

Server-Side SDKs

JavaScript

Java

iOS

Go

Android

.NET

Flutter

Python

React Native


Please Provide Feedback