Cache with Couchbase
Quick guide to get started with using cache with Couchbase.
Installing Prerequisites
For more details about couchbase and your prerequisites acess to couchbase documentation
Config
For configurate a mib to use a couchbase cahe, you need this configurations in the "MibCacheConfig.mibconfig":
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<couchbaseServers></couchbaseServers>
<couchbasePrefix></couchbasePrefix>
<couchbaseBucket></couchbaseBucket>
<couchbaseUsername></couchbaseUsername>
<couchbasePassword></couchbasePassword>
</default>
</mibConfig>
CouchbaseServers
In this configuration must be added the "Url + Port" to acess a couchbase server. Example:
http://localhost:8083
It's possible add one or more server in this config separated by , character.
CouchbasePrefix
In this configuration must be added one prefix to use for key generation. This key is used for documents persistence. Example:
My_private_prefix
CouchbaseBucket
In this configuration must be added the name of the bucket used for documents persistence. Example:
MyBucket
CouchbaseUsername
In this configuration must be added the username to acess the couchbase. Example:
Administrator
CouchbasePassword
In this configuration must be added the password to acess the couchbase. Example:
StrongPassword
Adittional configurations
It's possible more configurations for the couchbase. See all available settings and its respective functionality in couchbase:
couchbaseClientUseSsl ClusterOptions.EnableTls
couchbaseClientMgmtPort ClusterOptions.BootstrapHttpPort
couchbaseClientHttpsMgmtPort ClusterOptions.BootstrapHttpPortTls
couchbaseClientViewRequestTimeout ClusterOptions.ViewTimeout.Milliseconds
couchbaseClientQueryRequestTimeout ClusterOptions.QueryRequestTimeout
couchbaseClientEnableQueryTiming ClusterOptions.QueryTimeout.Milliseconds
couchbaseClientSearchRequestTimeout ClusterOptions.SearchTimeout.Milliseconds
couchbaseClientExpect100Continue ClusterOptions.EnableExpect100Continue
couchbaseClientMaxServicePointIdleTime ClusterOptions.IdleHttpConnectionTimeout.Milliseconds
couchbaseClientEnableTcpKeepAlives ClusterOptions.EnableTcpKeepAlives
couchbaseClientTcpKeepAliveTime ClusterOptions.TcpKeepAliveTime.Milliseconds
couchbaseClientTcpKeepAliveInterval ClusterOptions.TcpKeepAliveInterval.Milliseconds
couchbaseClientIgnoreRemoteCertificateNameMismatch ClusterOptions.KvIgnoreRemoteCertificateNameMismatch
couchbaseClientConfigPollInterval ClusterOptions.ConfigPollInterval.Milliseconds
couchbaseClientConfigPollEnabled ClusterOptions.EnableConfigPolling
couchbaseClientConfigPollCheckFloor ClusterOptions.ConfigPollFloorInterval.Milliseconds
couchbaseClientOperationTracingEnabled ClusterOptions.TracingOptions.Enabled
couchbaseClientOperationTracingServerDurationEnabled ClusterOptions.TracingOptions.Enabled
couchbaseClientOrphanedResponseLoggingEnabled ClusterOptions.OrphanTracingOptions.Enabled
couchbaseClientEnableCertificateRevocation ClusterOptions.EnableCertificateRevocation
couchbaseClientEnableCertificateAuthentication ClusterOptions.EnableCertificateAuthentication
couchbaseClientAnalyticsRequestTimeout ClusterOptions.AnalyticsTimeout.Milliseconds
couchbaseClientNetworkType ClusterOptions.NetworkResolution
couchbaseMaxKvConnections ClusterOptions.MaxKvConnections
couchbaseKvSendQueueCapacity ClusterOptions.KvSendQueueCapacity
couchbaseEnableMutationTokens ClusterOptions.EnableMutationTokens
couchbaseForceIPv4 ClusterOptions.ForceIPv4
couchbaseConfigIdleRedialTimeout ClusterOptions.ConfigIdleRedialTimeout
couchbaseIdleKvConnectionTimeout ClusterOptions.IdleKvConnectionTimeout
couchbaseMaxHttpConnections ClusterOptions.MaxHttpConnections
couchbaseHttpConnectionLifetime ClusterOptions.HttpConnectionLifetime
couchbaseEnableOperationDurationTracing ClusterOptions.EnableOperationDurationTracing
couchbaseBootstrapPollInterval ClusterOptions.BootstrapPollInterval
couchbaseEnableDnsSrvResolution ClusterOptions.EnableDnsSrvResolution
couchbaseCompression ClusterOptions.Compression
couchbaseCompressionMinSize ClusterOptions.CompressionMinSize
couchbaseCompressionMinRatio ClusterOptions.CompressionMinRatio
couchbaseCircuitBreakerEnabled ClusterOptions.CircuitBreakerConfiguration
couchbaseCircuitBreakerVolumeThreshold ClusterOptions.CircuitBreakerConfiguration
couchbaseCircuitBreakerErrorThresholdPercentage ClusterOptions.CircuitBreakerConfiguration
couchbaseCircuitBreakerSleepWindow ClusterOptions.CircuitBreakerConfiguration
couchbaseCircuitBreakerRollingWindow ClusterOptions.CircuitBreakerConfiguration
couchbaseCircuitBreakerCanaryTimeout ClusterOptions.CircuitBreakerConfiguration
couchbaseTuningOptionsMaximumOperationBuilderCapacity ClusterOptions.TuningOptions
couchbaseTuningOptionsMaximumRetainedOperationBuilders ClusterOptions.TuningOptions
couchbaseExperimentalOptionsChannelConnectionPools ClusterOptions.ExperimentalOptions
couchbaseRetryStrategyEnabled ClusterOptions.IRetryStrategy
couchbaseRetryStrategyMaxRetries ClusterOptions.IRetryStrategy
couchbaseRetryStrategyDelayMillis ClusterOptions.IRetryStrategy
couchbaseRetryStrategyMaxDelayMillis ClusterOptions.IRetryStrategy
couchbasePoolMinSize ClusterOptions.NumKvConnections
couchbasePoolWaitTimeout ClusterOptions.KvTimeout.Seconds
couchbasePoolConnectTimeout ClusterOptions.KvConnectTimeout.Seconds
couchbaseTimeoutWaitUntilReady Cluster.WaitUntilReadyAsync
Migration from SDK2x to SDK3x
From version 5.0 of MibPlataform, SDK3x support has been added. See what has changed:
Config
CouchbaseServers
In this configuration must be added the "Url + Port" to acess a couchbase server. Example:
http://localhost?port=8083
It's possible add one or more server in this config separated by , character.
Adittional configurations
This adittional configurations are no longer supported in this version:
<couchbaseClientServerResolverType>
<couchbaseClientUseInterNetworkV6Addresses>
<couchbaseClientTranscoder>
<couchbaseClientConverter>
<couchbaseClientSerializer>
<couchbaseClientIOService>
<couchbaseClientConnectionString>
<couchbaseClientConfigurationProviders>
<EnableConfigHeartBeat>
<HeartbeatConfigInterval>
<HeartbeatConfigCheckFloor>
<couchbaseClientSslPort>
<couchbaseClientApiPort>
<couchbaseClientDirectPort>
<couchbaseClientHttpsApiPort>
<couchbaseClientObserveInterval>
<couchbaseClientMaxViewRetries>
<couchbaseClientViewHardTimeout>
<couchbaseClientEnableQueryTiming>
<couchbaseClientEnableOperationTiming>
<couchbaseClientOperationLifespan>
<couchbaseClientNodeAvailableCheckInterval>
<couchbaseClientIOErrorThreshold>
<couchbaseClientIOErrorCheckInterval>
<couchbaseClientQueryFailedThreshold>
<couchbaseClientVBucketRetrySleepTime>
<couchbaseClientUseConnectionPooling>
<couchbaseClientEnableDeadServiceUriPing>
<couchbaseClientForceSaslPlain>
<couchbasePoolShutdownTimeout>
<couchbasePoolUseSsl>
<couchbasePoolBufferSize>
<couchbasePoolEnableTcpKeepAlives>
<couchbasePoolTcpKeepAliveTime>
<couchbasePoolTcpKeepAliveInterval>
<couchbasePoolCloseAttemptInterval>
<couchbasePoolMaxCloseAttempts>
<couchbasePoolMaxAcquireIterationCount>
<couchbasePoolOperationTimeout>
<couchbasePoolReceiveTimeout>
<couchbasePoolUseEnhancedDurability>
<couchbasePoolUseKvErrorMap>
<couchbasePoolMinConnectionValue>
<couchbasePoolMaxConnectionValue>