![]() |
VOOZH | about |
dotnet add package Scaleout.AspNetCore --version 1.1.1-beta
NuGet\Install-Package Scaleout.AspNetCore -Version 1.1.1-beta
<PackageReference Include="Scaleout.AspNetCore" Version="1.1.1-beta" />
<PackageVersion Include="Scaleout.AspNetCore" Version="1.1.1-beta" />Directory.Packages.props
<PackageReference Include="Scaleout.AspNetCore" />Project file
paket add Scaleout.AspNetCore --version 1.1.1-beta
#r "nuget: Scaleout.AspNetCore, 1.1.1-beta"
#:package Scaleout.AspNetCore@1.1.1-beta
#addin nuget:?package=Scaleout.AspNetCore&version=1.1.1-beta&prereleaseInstall as a Cake Addin
#tool nuget:?package=Scaleout.AspNetCore&version=1.1.1-beta&prereleaseInstall as a Cake Tool
This library provides an implementation of Microsoft.Extensions.Caching.Distributed.IDistributedCache for session state storage using ScaleOut StateServer in ASP.NET Core web applications.
NuGet: Install-Package Scaleout.AspNetCore
To configure your ASP.NET Core web application to use ScaleOut StateServer for session state storage:
Install-Package Scaleout.AspNetCoreappsettings.json), add the following configuration elements, replacing the example configuration values as appropriate to your environment (Configuration elements are described in further detail later in this document): "ScaleOutStateServer": {
"gateways": [
{
"ip": "10.0.0.100",
"servicePort": 721
},
{
"ip": "10.0.0.101",
"servicePort": 721
}
],
"defaultNamespace": "HelloWorld",
"protocol": "SossTcpTransport"
}
ConfigureServices(IServiceCollection) initialization method, add the following line(s): public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
// ...
services.AddSession();
// Add ScaleOut implementation of IDistributedCache.
services.AddScaleoutDistributedCache(Configuration);
// ...
}
Note: If the application configuration file(s) use a different name than "ScaleOutStateServer" for the configuration element, you may use the AddScaleoutDistributedCache(ConfigurationSection) overload, e.g., services.AddScaleoutDistributedCache(Configuration.GetSection("MyScaleOutConfigurationSection")).
That's it! All session access (typically through HttpContext.Session) will automatically read and store session information to the ScaleOut StateServer in-memory data grid.
REQUIRED. List of gateways to use to connect to the ScaleOut StateServer service. Each element has two values:
ip (string). REQUIRED. The IP address of the gateway.servicePort (integer). Optional. The service port for the selected protocol. Default: 721 (for the SossTcpTransport provider). If the SossHttpTransport is used, the port should be changed to direct requests to the port used by the ScaleOut REST API Service (typically port 4001).Example
"gateways": [
{
"ip": "10.0.0.100",
"servicePort": 721
},
{
"ip": "10.0.0.101",
"servicePort": 721
}
]
REQUIRED. The name of the application namespace to use in the ScaleOut StateServer in-memory data grid.
Optional. The maximum size (in bytes) of the serialized network cache held in the client memory process to minimize data transfer to and from the ScaleOut StateServer service when the client is internally known to be working with the latest version of a ScaleOut StateServer data grid object. Default: 10 MB.
Optional. The number of attempts for any operation which accesses the ScaleOut StateServer data grid before throwing an exception. Default: 3.
Optional. The protocol to use when communicating between the client application and the ScaleOut StateServer service. Two protocols are currently supported:
SossTcpTransport (default): Connects directly to the ScaleOut service. Offers the best performance.
SossHttpTransport: Communicates to the ScaleOut StateServer service over HTTP via the ScaleOut REST API service.
Optional. Whether to use the secure version of the selected protocol. If set to true, ensure the associated service is properly configured to accept secure requests. Default: false.
The accept_secure, secure_svr_port, and secure_mgt_port parameters must be set in the ScaleOut service to use encrypted communications with the SossTcpTransport protocol. The servicePort value in your config's gateways section must also be modified to point to the ScaleOut service's secure_svr_port.
If the SossHttpTransport protocol is to be secured, see the Configuring the REST API Service topic for details on how to enable HTTPS in the REST service.
Optional. When using the TcpGatewayTransport, gets or sets the maximum number of TCP connections that the library may open to each ScaleOut host in the data grid. The default value is 16 TCP connections per ScaleOut host.
Optional. The maximum amount of time (in seconds) that can elapse before the client library performs a round-trip to the authoritative ScaleOut service. During this interval, a requested object can be returned directly from the in-process cache, which results in very good performance, but the returned value could be stale. The default value is 0 seconds (the cache is fully coherent).
The CoherencyInterval option is only supported by the TcpGatewayTransport protocol.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
1.1.0-beta:
Added new SossTcpTransport option for improved network performance. This is the new default connection transport--clients using the original HTTP transport are encouraged to update their config files to use the new TCP transport.
Added new CoherencyInterval configuration option, allowing stale reads to be performed for the configured period in exchange for dramatically improved performance.
1.1.1-beta:
Fixed link to documentation in nuget package