v.1.1.54245New Features

Sessions in HTTP Interface

Sessions in the HTTP interface.
Introduces support for server-side sessions in the HTTP interface of ClickHouse, enabling persistent session management across multiple HTTP requests.

Why it matters

This feature was created to solve the problem of handling stateful interactions over the inherently stateless HTTP protocol. By supporting sessions in the HTTP interface, it allows users to maintain context (such as temporary tables, user settings, or query state) throughout multiple requests without reauthentication or reinitialization. This improves usability for applications integrating with ClickHouse via HTTP and enhances performance and user experience by reducing redundant operations.

How to use it

To use sessions in the HTTP interface, clients need to enable session handling by including the SessionId HTTP parameter or cookie in their requests. The server will create and maintain the session state associated with this session identifier. Subsequent requests with the same SessionId will share the session context. Sessions can be explicitly closed using appropriate HTTP requests or allowed to expire based on server settings.