package.dist.src.config.configurations.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Client SDK for Momento services
The newest version!
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InRegion = exports.Lambda = exports.Laptop = void 0;
const configuration_1 = require("./configuration");
const fixed_count_retry_strategy_1 = require("./retry/fixed-count-retry-strategy");
const sdk_core_1 = require("@gomomento/sdk-core");
const __1 = require("..");
const default_momento_logger_1 = require("./logging/default-momento-logger");
// 4 minutes. We want to remain comfortably underneath the idle timeout for AWS NLB, which is 350s.
const defaultMaxIdleMillis = 4 * 60 * 1000;
const defaultMaxSessionMemoryMb = 256;
const defaultLoggerFactory = new default_momento_logger_1.DefaultMomentoLoggerFactory();
const defaultMiddlewares = [];
function defaultRetryStrategy(loggerFactory) {
return new fixed_count_retry_strategy_1.FixedCountRetryStrategy({
loggerFactory: loggerFactory,
maxAttempts: 3,
});
}
/**
* Laptop config provides defaults suitable for a medium-to-high-latency dev environment. Permissive timeouts, retries, and
* relaxed latency and throughput targets.
* @export
* @class Laptop
*/
class Laptop extends configuration_1.CacheConfiguration {
/**
* Provides the latest recommended configuration for a laptop development environment. NOTE: this configuration may
* change in future releases to take advantage of improvements we identify for default configurations.
* @param {MomentoLoggerFactory} [loggerFactory=defaultLoggerFactory]
* @returns {CacheConfiguration}
*/
static latest(loggerFactory = defaultLoggerFactory) {
return Laptop.v1(loggerFactory);
}
/**
* Provides v1 recommended configuration for a laptop development environment. This configuration is guaranteed not
* to change in future releases of the Momento node.js SDK.
* @param {MomentoLoggerFactory} [loggerFactory=defaultLoggerFactory]
* @returns {CacheConfiguration}
*/
static v1(loggerFactory = defaultLoggerFactory) {
const deadlineMillis = 5000;
const grpcConfig = new __1.StaticGrpcConfiguration({
deadlineMillis: deadlineMillis,
maxSessionMemoryMb: defaultMaxSessionMemoryMb,
keepAlivePermitWithoutCalls: 1,
keepAliveTimeMs: 5000,
keepAliveTimeoutMs: 1000,
});
const transportStrategy = new __1.StaticTransportStrategy({
grpcConfiguration: grpcConfig,
maxIdleMillis: defaultMaxIdleMillis,
});
return new Laptop({
loggerFactory: loggerFactory,
retryStrategy: defaultRetryStrategy(loggerFactory),
transportStrategy: transportStrategy,
middlewares: defaultMiddlewares,
throwOnErrors: false,
readConcern: sdk_core_1.ReadConcern.BALANCED,
compression: undefined,
});
}
}
exports.Laptop = Laptop;
class Lambda extends configuration_1.CacheConfiguration {
/**
* Provides the latest recommended configuration for a lambda environment. NOTE: this configuration may
* change in future releases to take advantage of improvements we identify for default configurations.
* @param {MomentoLoggerFactory} [loggerFactory=defaultLoggerFactory]
* @returns {CacheConfiguration}
*/
static latest(loggerFactory = defaultLoggerFactory) {
const deadlineMillis = 1100;
const grpcConfig = new __1.StaticGrpcConfiguration({
deadlineMillis: deadlineMillis,
maxSessionMemoryMb: defaultMaxSessionMemoryMb,
numClients: 1,
});
const transportStrategy = new __1.StaticTransportStrategy({
grpcConfiguration: grpcConfig,
maxIdleMillis: defaultMaxIdleMillis,
});
return new Lambda({
loggerFactory: loggerFactory,
retryStrategy: defaultRetryStrategy(loggerFactory),
transportStrategy: transportStrategy,
middlewares: defaultMiddlewares,
throwOnErrors: false,
readConcern: sdk_core_1.ReadConcern.BALANCED,
compression: undefined,
});
}
}
exports.Lambda = Lambda;
class InRegionDefault extends configuration_1.CacheConfiguration {
/**
* Provides the latest recommended configuration for a typical in-region environment. NOTE: this configuration may
* change in future releases to take advantage of improvements we identify for default configurations.
* @param {MomentoLoggerFactory} [loggerFactory=defaultLoggerFactory]
* @returns {CacheConfiguration}
*/
static latest(loggerFactory = defaultLoggerFactory) {
return InRegionDefault.v1(loggerFactory);
}
/**
* Provides v1 recommended configuration for a typical in-region environment. This configuration is guaranteed not
* to change in future releases of the Momento node.js SDK.
* @param {MomentoLoggerFactory} [loggerFactory=defaultLoggerFactory]
* @returns {CacheConfiguration}
*/
static v1(loggerFactory = defaultLoggerFactory) {
const deadlineMillis = 1100;
const grpcConfig = new __1.StaticGrpcConfiguration({
deadlineMillis: deadlineMillis,
maxSessionMemoryMb: defaultMaxSessionMemoryMb,
keepAlivePermitWithoutCalls: 1,
keepAliveTimeMs: 5000,
keepAliveTimeoutMs: 1000,
});
const transportStrategy = new __1.StaticTransportStrategy({
grpcConfiguration: grpcConfig,
maxIdleMillis: defaultMaxIdleMillis,
});
return new InRegionDefault({
loggerFactory: loggerFactory,
retryStrategy: defaultRetryStrategy(loggerFactory),
transportStrategy: transportStrategy,
middlewares: defaultMiddlewares,
throwOnErrors: false,
readConcern: sdk_core_1.ReadConcern.BALANCED,
compression: undefined,
});
}
}
class InRegionLowLatency extends configuration_1.CacheConfiguration {
/**
* Provides the latest recommended configuration for an in-region environment with aggressive low-latency requirements.
* NOTE: this configuration may change in future releases to take advantage of improvements we identify for default
* configurations.
* @param {MomentoLoggerFactory} [loggerFactory=defaultLoggerFactory]
* @returns {CacheConfiguration}
*/
static latest(loggerFactory = defaultLoggerFactory) {
return InRegionLowLatency.v1(loggerFactory);
}
/**
* Provides v1 recommended configuration for an in-region environment with aggressive low-latency requirements.
* This configuration is guaranteed not to change in future releases of the Momento node.js SDK.
* @param {MomentoLoggerFactory} [loggerFactory=defaultLoggerFactory]
* @returns {CacheConfiguration}
*/
static v1(loggerFactory = defaultLoggerFactory) {
const deadlineMillis = 500;
const grpcConfig = new __1.StaticGrpcConfiguration({
deadlineMillis: deadlineMillis,
maxSessionMemoryMb: defaultMaxSessionMemoryMb,
keepAlivePermitWithoutCalls: 1,
keepAliveTimeMs: 5000,
keepAliveTimeoutMs: 1000,
});
const transportStrategy = new __1.StaticTransportStrategy({
grpcConfiguration: grpcConfig,
maxIdleMillis: defaultMaxIdleMillis,
});
return new InRegionDefault({
loggerFactory: loggerFactory,
retryStrategy: defaultRetryStrategy(loggerFactory),
transportStrategy: transportStrategy,
middlewares: defaultMiddlewares,
throwOnErrors: false,
readConcern: sdk_core_1.ReadConcern.BALANCED,
compression: undefined,
});
}
}
/**
* InRegion provides defaults suitable for an environment where your client is running in the same region as the Momento
* service. It has more aggressive timeouts and retry behavior than the Laptop config.
* @export
* @class InRegion
*/
class InRegion {
}
exports.InRegion = InRegion;
/**
* This config prioritizes throughput and client resource utilization. It has a slightly relaxed client-side timeout
* setting to maximize throughput.
* @type {InRegionDefault}
*/
InRegion.Default = InRegionDefault;
/**
* This config prioritizes keeping p99.9 latencies as low as possible, potentially sacrificing
* some throughput to achieve this. It has a very aggressive client-side timeout. Use this
* configuration if the most important factor is to ensure that cache unavailability doesn't force
* unacceptably high latencies for your own application.
* @type {InRegionLowLatency}
*/
InRegion.LowLatency = InRegionLowLatency;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29uZmlnL2NvbmZpZ3VyYXRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1EQUFtRDtBQUNuRCxtRkFBMkU7QUFHM0Usa0RBQXNFO0FBQ3RFLDBCQUtZO0FBQ1osNkVBQTZFO0FBRTdFLG9HQUFvRztBQUNwRyxNQUFNLG9CQUFvQixHQUFHLENBQUMsR0FBRyxFQUFFLEdBQUcsSUFBSyxDQUFDO0FBQzVDLE1BQU0seUJBQXlCLEdBQUcsR0FBRyxDQUFDO0FBQ3RDLE1BQU0sb0JBQW9CLEdBQ3hCLElBQUksb0RBQTJCLEVBQUUsQ0FBQztBQUNwQyxNQUFNLGtCQUFrQixHQUFpQixFQUFFLENBQUM7QUFFNUMsU0FBUyxvQkFBb0IsQ0FDM0IsYUFBbUM7SUFFbkMsT0FBTyxJQUFJLG9EQUF1QixDQUFDO1FBQ2pDLGFBQWEsRUFBRSxhQUFhO1FBQzVCLFdBQVcsRUFBRSxDQUFDO0tBQ2YsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUVEOzs7OztHQ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