USAGE127.0.0.1

127.0.0.1  时间:2021-05-19  阅读:()
DistributedCacheServiceFAQsDate2020-03-17Contents1InstanceTypes/Versions.
11.
1ComparingRedisandMemcached.
11.
2ComparingRedisVersions.
31.
3NewFeaturesofDCSforRedis4.
0.
41.
4NewFeaturesofDCSforRedis5.
0.
81.
5HowDoIChooseBetweenArmandx86142ClientandNetworkConnection.
162.
1HowDoIConfigureaSecurityGroup162.
2DoesDCSSupportPublicAccess172.
3TroubleshootingRedisConnectionExceptions.
182.
4DoesDCSSupportCross-VPCAccess202.
5WillIBeChargedfortheEIPUsedforPublicAccesstoaDCSRedisInstance212.
6HowCanIAccessDCSAcrossSub-projects212.
7WhyIs"(error)NOAUTHAuthenticationrequired"DisplayedWhenIAccessaDCSRedisInstance212.
8WhyDoesaRedisClusterDCSInstanceFailtoBePinged212.
9WhatShouldIDoIfAccesstoDCSFailsAfterServerDisconnects222.
10WhyDoRequestsSometimesTimeOutinClients222.
11WhatShouldIDoIfanErrorIsReturnedWhenIUsetheJedisConnectionPool222.
12WhyIs"ERRunknowncommand"DisplayedWhenIAccessaDCSRedisInstanceThroughaRedisClient242.
13HowDoIAccessaDCSRedisInstanceThroughRedisDesktopManager252.
14WhatIf"ERRUnsupportedCONFIGsubcommand"isDisplayedinSpringCloud272.
15WhyDoIFailtoAccessaDCSInstanceUsingItsDomainNameAddress272.
16IsaPasswordRequiredforAccessinganInstanceHowDoISetaPassword282.
17CanIAccessDCSInstancesinaLocalEnvironment282.
18WhatShouldBeNotedWhenUsingRedisforPub/Sub282.
19WhyIsPublicAccessofMyDCSRedisInstanceUnintentionallyDisabled293RedisUsage.
303.
1WhyIsCPUUsageofaDCSRedisInstance100%303.
2CanIChangetheVPCandSubnetforaDCSRedisInstance303.
3WhyCan'tSecurityGroupsConfiguredforDCSRedis4.
0and5.
0Instances303.
4DoDCSRedisInstancesLimittheSizeofaKeyorValue31DistributedCacheServiceFAQsContents2020-03-17ii3.
5CanIObtaintheAddressesoftheNodesinaClusterDCSRedisInstance313.
6WhyIsAvailableMemorySmallerThanInstanceCacheSize313.
7DoesDCSforRedisSupportRead/WriteSplitting313.
8DoesDCSforRedisSupportMulti-DB323.
9DoesDCSforRedisSupportRedisClusters323.
10DoesDCSforRedisSupportSentinel323.
11WhatIstheDefaultDataEvictionPolicy323.
12WhatShouldIDoIfanErrorOccursinRedisExporter333.
13WhyIsMemoryUsageMoreThan100%333.
14HowCanISecureMyDCSRedisInstances333.
15WhyIsRedissonDistributedLockNotSupportedbyDCSProxyClusterRedis3.
0Instances343.
16CanICustomizeorChangethePortforAccessingaDCSInstance343.
17CanIModifytheConnectionAddressesforAccessingaDCSInstance353.
18WhyDoIFailtoDeleteanInstance353.
19DoesDCSSupportCross-AZDeployment353.
20WhyDoesItTakeaLongTimetoStartaClusterDCSInstance363.
21WhatIfRedisCommandsAreIncompatiblewithDCSforRedis363.
22DoesDCSforRedisProvideBackendManagementSoftware363.
23WhyIsMemoryofaDCSRedisInstanceUsedUpbyJustaFewKeys363.
24CanIRecoverDatafromDeletedDCSInstances363.
25DoesDCSforRedisSupportSSLEncryption373.
26HowDoIEnableorDisableSSLforPublicAccesstoaDCSRedisInstance373.
27WhyIsMemoryUsageofaDCSInstance100%383.
28WhyIsAvailableMemoryofUnusedDCSInstancesLessThanTotalMemoryandWhyIsMemoryUsageofUnusedDCSInstancesGreaterThanZero383.
29HowDoIEstimateRedisMemoryUsage393.
30WhyIstheCapacityorPerformanceofaShardofaRedisClusterInstanceOverloadedWhenThatoftheInstanceIsStillBelowtheBottleneck423.
31DoesDCSSupportExternalExtensions,Plug-ins,orModules424InstanceScalingandUpgrade.
434.
1CanDCSRedisInstancesBeUpgraded,forExample,fromRedis3.
0toRedis4.
0or5.
0434.
2AreServicesInterruptedIfMaintenanceisPerformedDuringtheMaintenanceTimeWindow434.
3AreInstanceResourcesAffectedDuringSpecificationModification434.
4CanIChangeaSingle-NodeDCSRedisInstancetotheMaster/StandbyorClusterType434.
5AreServicesInterruptedDuringSpecificationModification444.
6WhyDoIFailtoModifytheSpecificationsforaDCSInstance454.
7HowDoIReducetheCapacityofaClusterDCSInstance455DataBackup,Export,andMigration.
465.
1HowDoIExportDCSRedisInstanceData465.
2WhyIsMemoryofaDCSRedisInstanceUnchangedAfterDataMigrationUsingRump,EvenIfNoErrorMessageIsReturned465.
3CanIExportBackupDataofDCSRedisInstancestoRDBFilesontheConsole47DistributedCacheServiceFAQsContents2020-03-17iii5.
4WhyAreProcessesFrequentlyKilledDuringDataMigration475.
5WhereAreDCSInstanceBackupFilesStoredHowAreTheyCharged475.
6IsAllDatainaDCSRedisInstanceMigratedDuringOnlineMigration475.
7DoesDCSSupportDataPersistence475.
8WhyDoesDataMigrationFail486AnalysisofBigKeysandHotKeys.
496.
1WhatIstheImpactofaBigKey496.
2WhatIstheImpactofaHotKey496.
3HowDoIAvoidBigKeysandHotKeys496.
4HowDoIAnalyzetheHotKeysofaDCSRedis3.
0Instance496.
5HowDoIDetectBigKeysandHotKeysinAdvance507RedisCommands.
517.
1HowDoIClearRedisData517.
2HowDoIFindSpecifiedKeysandTraverseAllKeys517.
3WhyDoIFailtoExecuteSomeRedisCommands527.
4Whyis"permissiondenied"ReturnedWhenIRuntheKeysCommandinWebCLI527.
5HowDoIRenameHigh-RiskCommands527.
6DoesDCSforRedisSupportPipelining537.
7DoesDCSforRedisSupporttheINCRandEXPIRECommands537.
8WhyDoesaRedisCommandFailtoTakeEffect537.
9IsThereaTimeLimitonExecutingRedisCommandsWhatWillHappenIfaCommandTimesOut547.
10CanIConfigureRedisKeystoBeCase-Insensitive547.
11CanIViewtheMostFrequentlyUsedRedisCommands548MonitoringandAlarm.
558.
1HowDoIViewConcurrentConnectionsofaDCSRedisInstance558.
2DoesRedisSupportCommandAudits558.
3WhatShouldIDoIftheMonitoringDataofaDCSRedisInstanceIsAbnormal558.
4WhyIsUsedMemoryGreaterThanAvailableMemory568.
5WhyDoesBandwidthUsageExceed100%568.
6WhyIstheRejectedConnectionsMetricDisplayed579Master/StandbySwitchover.
589.
1WhenDoesaMaster/StandbySwitchoverOccur589.
2HowDoesMaster/StandbySwitchoverAffectServices589.
3DoestheClientNeedtoSwitchtheConnectionAddressAfteraMaster/StandbySwitchover589.
4HowDoesRedisMaster/StandbyReplicationWork5910PurchasingandBilling.
6010.
1WhyDoIFailtoCreateaDCSRedisorMemcachedInstance6010.
2WhyCan'tIViewtheSubnetandSecurityGroupInformationWhenCreatingaDCSInstance6011MemcachedUsage.
61DistributedCacheServiceFAQsContents2020-03-17iv11.
1CanIDumpDCSMemcachedInstanceDataforAnalysis6111.
2WhatMemcachedVersionIsCompatiblewithDCSforMemcached6111.
3WhatDataStructuresDoesDCSforMemcachedSupport6111.
4DoesDCSforMemcachedSupportPublicAccess6111.
5CanIModifyConfigurationParametersofDCSMemcachedInstances6111.
6WhatAretheDifferencesBetweenDCSforMemcachedandSelf-HostedMemcached6211.
7WhatPoliciesDoesDCSforMemcachedUsetoDealwithExpiredData6211.
8HowShouldISelectAZsWhenCreatingaDCSMemcachedInstance6312DCSPasswordComplexityRequirements.
64DistributedCacheServiceFAQsContents2020-03-17v1InstanceTypes/Versions1.
1ComparingRedisandMemcachedRedisandMemcachedarebothpopularopen-sourcein-memorydatabaseswhichareeasytouseandprovidehigherperformancethanrelationaldatabases.
HowcanIselectbetweenthetwokey-valuedatabasesMemcachedissuitableforstoringsimpledatastructures,whereasRedisissuitableforstoringmorecomplex,largerdatathatrequirespersistency.
Fordetails,seethefollowingtable.
Table1-1DifferencesbetweenRedisandMemcachedItemRedisMemcachedLatencyIn-memorydatabasewithsub-millisecondlatencyIn-memorydatabasewithsubmillisecondlatencyEaseofuseSimplesyntaxandeasytouseSimplesyntaxandeasytouseDistributedstorageHorizontalexpansioninclustermodeSupportedMulti-languageclientSupportsclientconnectionsinmorethan30languagesincludingJava,C,andPython.
Supportsclientconnectionsinmorethan10languagesincludingJava,C,andPython.
Thread/ProcessSingle-coreandsingle-threadSingle-threadcommunication,avoidingunnecessarycontextswitchingandcontentionNon-blockingI/O(I/Omultiplexing)isusedtoreduceresourceconsumptionwhenmultipleclientsareconnected.
Multi-threadandscalableTheMemcachedperformancecanbeimprovedbyincreasingthenumberofCPUs.
Thereisanobviousperformanceadvantageinthescenariowherethevalueofkeyisgreat.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-171ItemRedisMemcachedPersistentstorageSupportedEachwriteoperation(adding,deleting,ormodifyingdata)canberecordedondisk(AOFfile).
SupportedNOTEPersistenceisnotsupportedbyopen-sourceMemcached,butissupportedbyHUAWEICLOUDDCSforMemcached.
DatastructureSupportscomplexdatastructuressuchashash,list,set,andsortedset,cateringtovariousscenarios.
Supportssimplestrings.
LuascriptsupportSupportedNotsupportedSnapshotbackupSupportedSnapshotsaregeneratedperiodically.
Therefore,thereisnoguaranteethatdatawillnotbelost.
Redisforksasubprocesstogeneratesnapshots.
Whenthereisalargeamountofdata,theRedisservicemaybeinterruptedforashorttime.
NotsupportedDatamigrationSupportedDatacanbebackedupandmigratedtoanewRedisinstancethroughRDBsnapshotrestorationorAOFfileplayback.
NotsupportedKeyvaluerestrictionThevalueofakeycanbeupto1GB.
1MBMultipledatabasesSupportsupto256Redisdatabases.
NotsupportedBasedontheprecedingcomparison,boththeRedisandMemcachedareeasytouseandhavehighperformance.
However,RedisandMemcachedaredifferentindatastructurestorage,persistence,backup,migration,andscriptsupport.
Youareadvisedtoselectthemostappropriatecacheenginebasedonactualapplicationscenarios.
NOTEMemcachedissuitableforcachingscenariosofsmallamountofstaticdata,wheredataisonlyreadwithoutfurthercomputingandprocessing,forexample,HTMLcodesnippets.
Redishasricherdatastructuresandwiderapplicationscenarios.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-1721.
2ComparingRedisVersionsWhencreatingaDCSRedisinstance,youcanselectthecacheengineversionandtheinstancetype.
VersionDCSsupportsRedis3.
0,4.
0,and5.
0.
Table1-2describesthedifferencesbetweentheseversions.
FordetailsaboutthenewfeaturesofRedis4.
0and5.
0,seeNewFeaturesofDCSforRedis4.
0andNewFeaturesofDCSforRedis5.
0Table1-2DifferencesbetweenRedisversionsFeatureRedis3.
0Redis4.
0andRedis5.
0InstancedeploymentmodeBasedonVMsContainerizedbasedonphysicalserversCPUarchitecturex86x86andArmTimerequiredforcreatinganinstance3–15minutesClusterinstance:10–30minutes8secondsQPS100,000QPSpernode100,000QPSpernodePublicnetworkaccessSupportedNotsupportedDomainnameconnectionSupportedinVPCSupportedinVPCVisualizeddatamanagementNotsupportedProvidesWebCLIforRedisaccessanddatamanagement.
InstancetypeSingle-node,master/standby,andProxyClusterSingle-node,master/standby,andRedisClusterDistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-173FeatureRedis3.
0Redis4.
0andRedis5.
0InstancetotalmemoryRangesfrom2GBto1TB.
Regularspecificationsrangefrom2GBto1TB.
Smallspecificationsof128MB,256MB,512MB,and1GBarealsoavailableforsingle-nodeandmaster/standbyinstances.
Capacityexpansion/reductionOnlinecapacityexpansionandreductionOnlinecapacityexpansionandreductionBackupandrestorationSupportedformaster/standbyandclusterinstancesSupportedformaster/standbyandclusterinstancesNOTETheunderlyingarchitecturesvarybyRedisversion.
OnceaRedisversionischosen,itcannotbechanged.
Forexample,youcannotupgradeaDCSRedis3.
0instancetoRedis4.
0or5.
0.
IfyourequireahigherRedisversion,createanewinstancethatmeetsyourrequirementsandthenmigratedatafromtheoldinstancetothenewone.
InstancetypeDCSprovidessingle-node,master/standby,ProxyCluster,andRedisClusterinstancetypes.
Fordetailsabouttheirarchitecturesandapplicationscenarios,seeDCSInstanceTypes.
1.
3NewFeaturesofDCSforRedis4.
0ComparedwithDCSforRedis3.
0,DCSforRedis4.
0andlaterversionsaddsupportforthenewfeaturesofopen-sourceRedisandsupportsfasterinstancecreation.
InstancedeploymentchangedfromtheVMmodetophysicalserver–basedcontainerizationmode.
Aninstancecanbecreatedwithin8to10seconds.
Redis4.
0providesthefollowingnewfeatures:1.
Newcommands,suchasMEMORYandSWAPDB2.
Lazyfree,delayingthedeletionoflargekeysandreducingtheimpactofthedeletiononsystemresources3.
Memoryperformanceoptimization,thatis,activedefragmentationMEMORYCommandInRedis3.
0andearlierversions,youcanexecutetheINFOMEMORYcommandtolearnonlythelimitedmemorystatistics.
Redis4.
0introducestheMEMORYcommandtohelpyoubetterunderstandRedismemoryusage.
127.
0.
0.
1:6379[8]>memoryhelp1)MEMORYargarg.
.
.
arg.
Subcommandsare:DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-1742)DOCTOR-Returnmemoryproblemsreports.
3)MALLOC-STATS--Returninternalstatisticsreportfromthememoryallocator.
4)PURGE--Attempttopurgedirtypagesforreclamationbytheallocator.
5)STATS--Returninformationaboutthememoryusageoftheserver.
6)USAGE[SAMPLES]--Returnmemoryinbytesusedbyanditsvalue.
Nestedvaluesaresampleduptotimes(default:5).
127.
0.
0.
1:6379[8]>usageEntermemoryusage[key].
Ifthekeyexists,theestimatedmemoryusedbythevalueofthekeyisreturned.
Ifthekeydoesnotexist,nilisreturned.
127.
0.
0.
1:6379[8]>setdcs"DCSisanonline,distributed,in-memorycacheservicecompatiblewithRedis,andMemcached.
"OK127.
0.
0.
1:6379[8]>memoryusagedcs(integer)141127.
0.
0.
1:6379[8]>NOTE1.
usagecollectsstatisticsonthememoryusageofthevalueandthekey,excludingtheExpirememoryusageofthekey.
//ThefollowingisverifiedbasedonRedis5.
0.
2.
ResultsmaydifferinotherRedisversions.
192.
168.
0.
66:6379>seta"Hello,world!
"OK192.
168.
0.
66:6379>memoryusagea(integer)58192.
168.
0.
66:6379>setabc"Hello,world!
"OK192.
168.
0.
66:6379>memoryusageabc(integer)60//Afterthekeynamelengthchanges,thememoryusagealsochanges.
Thisindicatesthattheusagestatisticscontaintheusageofthekey.
192.
168.
0.
66:6379>expireabc1000000(integer)1192.
168.
0.
66:6379>memoryusageabc(integer)60//Aftertheexpirationtimeisadded,thememoryusageremainsunchanged.
Thisindicatesthattheusagestatisticsdonotcontaintheexpirememoryusage.
192.
168.
0.
66:6379>2.
Forhashes,lists,sets,andsortedsets,theMEMORYUSAGEcommandsamplesstatisticsandprovidestheestimatedmemoryusage.
Usage:memoryusagekeysetsamples1000keysetindicatesthekeyofaset,and1000indicatesthenumberofsamples.
statsReturnsthedetailedmemoryusageofthecurrentinstance.
Usage:memorystats127.
0.
0.
1:6379[8]>memorystats1)"peak.
allocated"2)(integer)24124083)"total.
allocated"4)(integer)20847205)"startup.
allocated"6)(integer)8249287)"replication.
backlog".
.
.
.
.
.
Thefollowingtabledescribesthemeaningsofsomereturnitems.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-175Table1-3MEMORYSTATSreturnvaluesReturnValueDescriptionpeak.
allocatedPeakmemoryallocatedbytheallocatorduringRedisinstancerunningItisthesameasused_memory_peakofinfomemory.
total.
allocatedThenumberofbytesallocatedbytheallocator.
Itisthesameasused_memoryofinfomemorystartup.
allocatedInitialamountofmemoryconsumedbyRedisatstartupinbytesreplication.
backlogSizeinbytesofthereplicationbacklog.
Itisspecifiedintherepl-backlog-sizeparameter.
Thedefaultvalueis1MB.
clients.
slavesThetotalsizeinbytesofallreplicasoverheadsclients.
normalThetotalsizeinbytesofallclientsoverheadsoverhead.
totalThesumofalloverheads.
overhead.
totalisthetotalmemorytotal.
allocatedallocatedbytheallocatorminustheactualmemoryusedforstoringdata.
keys.
countThetotalnumberofkeysstoredacrossalldatabasesintheserverkeys.
bytes-per-keyAveragenumberofbytesoccupiedbyeachkey.
Notethattheoverheadisalsoallocatedtoeachkey.
Therefore,thisvaluedoesnotindicatetheaveragekeylength.
dataset.
bytesMemorybytesoccupiedbyRedisdata,thatis,overhead.
totalsubtractedfromtotal.
allocateddataset.
percentageThepercentageofdataset.
bytesoutofthenetmemoryusagepeak.
percentageThepercentageofpeak.
allocatedoutoftotal.
allocatedfragmentationMemoryfragmentationratedoctorUsage:memorydoctorIfthevalueofused_memory(total.
allocated)islessthan5MB,MEMORYDOCTORconsidersthatthememoryusageistoosmallanddoesnotperformfurtherdiagnosis.
Ifanyofthefollowingconditionsismet,Redisprovidesdiagnosisresultsandsuggestions:1.
Thepeakallocatedmemoryisgreaterthan1.
5timesofthecurrenttotal_allocated,thatis,peak.
allocated/total.
allocated>1.
5,indicatingthatthememoryfragmentationrateishigh,andthattheRSSismuchlargerthanused_memory.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-1762.
Thevalueofhighfragmentation/fragmentationisgreaterthan1.
4,indicatingthatthememoryfragmentationrateishigh.
3.
Theaveragememoryusageofeachnormalclientisgreaterthan200KB,indicatingthatthepipelinemaybeimproperlyusedorthePub/Subclientdoesnotprocessmessagesintime.
4.
Theaveragememoryusageofeachslaveclientisgreaterthan10MB,indicatingthatthewritetrafficofthemasteristoohigh.
purgeUsage:memorypurgeExecutesthejemallocinternalcommandtoreleasethememory.
ThereleasedobjectsincludethememorythatisoccupiedbutnotusedbyRedisprocesses,thatis,memoryfragments.
NOTEMEMORYPURGEappliesonlytotheRedisinstancethatusesjemallocastheallocator.
LazyfreeProblemRedisissingle-thread.
Whenatime-consumingrequestisexecuted,allrequestsarequeued.
Beforetherequestiscompleted,Rediscannotrespondtootherrequests.
Asaresult,performanceproblemsmayoccur.
Oneofthetime-consumingrequestsisdeletingalargekey.
PrincipleTheLazyfreefeatureofRedis4.
0avoidstheblockagecausedbydeletinglargekeys,ensuringperformanceandavailability.
Whendeletingakey,Redisasynchronouslyreleasesthememoryoccupiedbythekey.
Thekeyreleaseoperationisprocessedinthesub-threadofthebackgroundI/O(BIO).
Usage1.
Activedeletion–UNLINKSimilartoDEL,thiscommandremoveskeys.
Iftherearemorethan64elementstobedeleted,thememoryreleaseoperationisexecutedinanindependentBIOthread.
Therefore,theUNLINKcommandcandeletealargekeycontainingmillionsofelementsinashorttime.
–FLUSHALLandFLUSHDBAnASYNCoptionwasaddedtoFLUSHALLandFLUSHDBinordertolettheentiredatasetorasingledatabasetobefreedasynchronously.
2.
Passivedeletion:deletionofexpiredkeysandevictionoflargekeysTherearefourscenariosforpassivedeletionandeachscenariocorrespondstoaparameter.
Theseparametersaredisabledbydefault.
lazyfree-lazy-evictionno//WhethertoenableLazyfreewhentheRedismemoryusagereachesmaxmemoryandtheevictionpolicyisset.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-177lazyfree-lazy-expireno//WhethertoenableLazyfreewhenthekeywithTTLisgoingtoexpire.
lazyfree-lazy-server-delno//AnimplicitDELkeyisusedwhenanexistingkeyisprocessed.
slave-lazy-flushno//Performfulldatasynchronizationforthestandbynode.
BeforeloadingtheRDBfileofthemaster,thestandbynodeexecutestheFLUSHALcommandtoclearitsowndata.
NOTEToenabletheseconfigurations,submitaservicetickettocontacttechnicalsupport.
OtherNewCommands1.
swapdbSwapstwoRedisdatabases.
swapdbdbindex1dbindex22.
zlexcountReturnsthenumberofelementsinthesortedset.
zlexcountkeyminmaxMemoryandPerformanceOptimization1.
Comparedtobefore,thesameamountofdatacanbestoredwithlessmemory.
2.
Usedmemorycanbedefragmentedandgraduallyevicted.
1.
4NewFeaturesofDCSforRedis5.
0DCSforRedis5.
0iscompatiblewiththenewfeaturesoftheopen-sourceRedis5.
0,inadditiontoalltheimprovementsandnewcommandsinRedis4.
0.
StreamDataStructureStreamisanewdatatypeintroducedwithRedis5.
0.
Itsupportsmessagepersistenceandmulticast.
Figure1-1showsthestructureofaRedisstream,whichallowsmessagestobeappendedtothestream.
Streamshavethefollowingfeatures:1.
Astreamcanhavemultipleconsumergroups.
2.
EachconsumergroupcontainsaLast_delivered_idthatpointstothelastconsumeditem(message)intheconsumergroup.
3.
Eachconsumergroupcontainsmultipleconsumers.
Allconsumerssharethelast_delivered_idoftheconsumergroup.
Amessagecanbeconsumedbyonlyoneconsumer.
4.
pending_idsintheconsumercanbeusedtorecordtheIDsofitemsthathavebeensenttotheclient,buthavenotbeenacknowledged.
5.
FordetailedcomparisonbetweenstreamandotherRedisdatastructures,seeTable1-4.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-178Figure1-1StreamdatastructureTable1-4DifferencesbetweenstreamsandexistingRedisdatastructuresItemStreamList,Pub/Sub,ZsetComplexityofseekingitemsO(log(N))List:O(N)OffsetSupported.
EachitemhasauniqueID.
TheIDisnotchangedasotheritemsareaddedorevicted.
List:Notsupported.
Ifanitemisevicted,thelatestitemcannotbelocated.
PersistenceSupported.
StreamsarepersistedtoAOFandRDBfiles.
Pub/Sub:Notsupported.
ConsumergroupSupported.
Pub/Sub:Notsupported.
AcknowledgementSupported.
Pub/Sub:Notsupported.
PerformanceNotrelatedtothenumberofconsumers.
Pub/Sub:Positivelyrelatedtothenumberofclients.
EvictionStreamsarememoryefficientbyblockingtoevictthedatathatistoooldandusingaradixtreeandlistpack.
Zsetconsumesmorememorybecauseitdoesnotsupportinsertingsameitems,blocking,orevictingdataDistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-179ItemStreamList,Pub/Sub,ZsetRandomlydeletingitemsNotsupported.
Zset:Supported.
StreamcommandsStreamcommandsaredescribedbelowintheordertheyareused.
Fordetails,seeTable1-5.
1.
RuntheXADDcommandtoaddastreamitem,thatis,createastream.
Themaximumnumberofmessagesthatcanbesavedcanbespecifiedwhenaddingtheitem.
2.
CreateaconsumergroupbyrunningtheXGROUPcommand.
3.
AconsumerusestheXREADGROUPcommandtoconsumemessages.
4.
Aftertheconsumption,theclientrunstheXACKcommandtoconfirmthattheconsumptionissuccessful.
Figure1-2StreamcommandsTable1-5StreamcommandsdescriptionCommandDescriptionSyntaxXACKDeletesoneormultiplemessagesfromthependingentrylist(PEL)aconsumergroupofthestream.
XACKkeygroupID[ID.
.
.
]XADDAddsaspecifiedentrytothestreamataspecifiedkey.
Ifthekeydoesnotexist,runningthiscommandwillresultinakeytobeautomaticallycreatedbasedontheentry.
XADDkeyIDfieldstring[fieldstring.
.
.
]XCLAIMChangestheownershipofapendingmessage,sothatthenewowneristheconsumerspecifiedasthecommandargument.
XCLAIMkeygroupconsumermin-idle-timeID[ID.
.
.
][IDLEms][TIMEms-unix-time][RETRYCOUNTcount][FORCE][JUSTID]DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-1710CommandDescriptionSyntaxXDELRemovesthespecifiedentriesfromastream,andreturnsthenumberofentriesdeleted,thatmaybedifferentfromthenumberofIDspassedtothecommandincasecertainIDsdonotexist.
XDELkeyID[ID.
.
.
]XGROUPManagestheconsumergroupsassociatedwithastreamYoucanuseXGROUPto:Createanewconsumergroupassociatedwithastream.
Destroyaconsumergroup.
Removeaspecifiedconsumerfromaconsumergroup.
SettheconsumergrouplastdeliveryIDtosomethingelse.
XGROUP[CREATEkeygroupnameid-or-$][SETIDkeyid-or-$][DESTROYkeygroupname][DELCONSUMERkeygroupnameconsumername]XINFORetrievesdifferentinformationaboutthestreamsandassociatedconsumergroups.
XINFO[CONSUMERSkeygroupname]keykey[HELP]XLENReturnsthenumberofentriesinastream.
Ifthespecifiedkeydoesnotexist,0isreturned,indicatinganemptystream.
XLENkeyXPENDINGObtainsdatafromastreamthroughaconsumergroup.
Thiscommandistheinterfacetoinspectthelistofpendingmessagesinordertoobserveandunderstandwhatclientsareactive,whatmessagesarependingtobeconsumed,ortoseeifthereareidlemessages.
XPENDINGkeygroup[startendcount][consumer]XRANGEReturnsentriesmatchingagivenrangeofIDs.
XRANGEkeystartend[COUNTcount]XREADReadsdatafromoneormultiplestreams,onlyreturningentrieswithanIDgreaterthanthelastreceivedIDreportedbythecaller.
XREAD[COUNTcount][BLOCKmilliseconds]STREAMSkey[key.
.
.
]ID[ID.
.
.
]XREADGROUPAspecialversionoftheXREADcommand,whichisusedtospecifyaconsumergrouptoreadfrom.
XREADGROUPGROUPgroupconsumer[COUNTcount][BLOCKmilliseconds]STREAMSkey[key.
.
.
]ID[ID.
.
.
]DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-1711CommandDescriptionSyntaxXREVRANGEThiscommandisexactlylikeXRANGE,butwiththenotabledifferenceofreturningtheentriesinreverseorder,andalsotakingthestart-endrangeinreverseorder.
XREVRANGEkeyendstart[COUNTcount]XTRIMTrimsthestreamtoaspecifiednumberofitems,ifnecessary,evictingolditems(itemswithlowerIDs).
XTRIMkeyMAXLEN[~]countMessage(streamitem)acknowledgementComparedwithPub/Sub,streamsnotonlysupportconsumergroups,butalsomessageacknowledgement.
WhenaconsumerinvokestheXREADGROUPcommandtoreadorinvokestheXCLAIMcommandtotakeoveramessage,theserverdoesnotknowwhetherthemessageisprocessedatleastonce.
Therefore,oncehavingsuccessfullyprocessedamessage,theconsumershouldinvoketheXACKcommandtonotifythestreamsothatthemessagewillnotbeprocessedagain.
Inaddition,themessageisremovedfromPELandthememorywillbereleasedfromtheRedisserver.
Insomecases,suchasnetworkfaults,theclientdoesnotinvokeXACKafterconsumption.
Insuchcases,theitemIDisretainedinPEL.
Aftertheclientisreconnected,setthestartmessageIDofXREADGROUPto0-0,indicatingthatallPELmessagesandmessagesafterlast_idareread.
Inaddition,repeatedmessagetransmissionmustbesupportedwhenconsumersconsumemessages.
Figure1-3AcknowledgementmechanismMemoryUsageOptimizationThememoryusageofRedis5.
0isoptimizedbasedonthepreviousversion.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-1712ActivedefragmentationIfakeyismodifiedfrequentlyandthevaluelengthchangesconstantly,Rediswillallocateadditionalmemoryforthekey.
Toachievehighperformance,Redisusesthememoryallocatortomanagememory.
MemoryisnotalwaysfreeduptotheOS.
Asaresult,memoryfragmentsoccur.
Ifthefragmentationratio(used_memory_rss/used_memory)isgreaterthan1.
5,thememoryusageisinefficient.
Toreducememoryfragments,properlyplanandusecachedataandstandardizedatawriting.
ForRedis3.
0andearlierversions,memoryfragmentationproblemsareresolvedbyrestartingtheprocessregularly.
Itisrecommendedthattheactualcachedatadoesnotexceed50%oftheavailablememory.
ForRedis4.
0,activedefragmentationissupported,andmemoryisdefragmentedwhileonline.
Inaddition,Redis4.
0supportsmanualmemorydefragmentationbyrunningthememorypurgecommand.
ForRedis5.
0,improvedactivedefragmentationissupportedwiththeupdatedJemalloc,whichisfaster,moreintelligent,andprovideslowerlatency.
HyperLogLogimplementationimprovementsAHyperLogLogisaprobabilisticdatastructureusedtocalculatethecardinalityofasetwhileconsuminglittlememory.
Redis5.
0improvesHyperLogLogbyfurtheroptimizingitsmemoryusage.
Forexample:theB-treeisefficientincounting,butconsumesalotofmemory.
ByusingHyperLogLog,alotofmemorycanbesaved.
WhiletheB-treerequires1MBmemoryforcounting,HyperLogLogneedsonly1KB.
EnhancedmemorystatisticsTheinformationreturnedbytheINFOcommandismoredetailed.
NewandBetterCommands1.
Enhancedclientmanagement–redis-clisupportsclustermanagement.
InRedis4.
0andearlierversions,theredis-tribmoduleneedstobeinstalledtomanageclusters.
Redis5.
0optimizesredis-cli,integratingallclustermanagementfunctions.
Youcanruntheredis-cli--clusterhelpcommandformoreinformation.
–Theclientperformanceisenhancedinfrequentconnectionanddisconnectionscenarios.
Thisoptimizationisvaluablewhenyourapplicationneedstouseshortconnections.
2.
SimpleruseofsortedsetsZPOPMINandZPOPMAXcommandsareaddedforsortedsets.
–ZPOPMINkey[count]Removesandreturnsuptocountmemberswiththelowestscoresinthesortedsetstoredatkey.
Whenreturningmultipleelements,theonewiththelowestscorewillbethefirst,followedbytheelementswithhigherscores.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-1713–ZPOPMAXkey[count]Removesandreturnsuptocountmemberswiththehighestscoresinthesortedsetstoredatkey.
Whenreturningmultipleelements,theonewiththelowestscorewillbethefirst,followedbytheelementswithlowerscores.
3.
Moresub-commandsaddedtothehelpcommandThehelpcommandcanbeusedtoviewhelpinformation,savingyouthetroubleofvisitingredis.
ioeverytime.
Forexample,runthefollowingcommandtoviewthestreamhelpinformation:xinfohelp127.
0.
0.
1:6379>xinfohelp1)XINFOargarg.
.
.
arg.
Subcommandsare:2)CONSUMERS--Showconsumergroupsofgroup.
3)GROUPS--Showthestreamconsumergroups.
4)STREAM--Showinformationaboutthestream.
5)HELP--Printthishelp.
127.
0.
0.
1:6379>4.
redis-clicommandinputtipsAfteryouenteracompletecommand,redis-clidisplaysaparametertiptohelpyoumemorizethesyntaxformatofthecommand.
Asshowninthefollowingfigure,runthezaddcommand,andredis-clidisplayszaddsyntaxinlightcolor.
RDBStoringLFUandLRUInformationInRedis5.
0,storagekeyevictionpoliciesLRUandLFUwereaddedtotheRDBsnapshotfile.
FIFO:Firstin,firstout.
Theearlieststoreddataisevictedfirst.
LRU:Leastrecentlyused.
Datathatisnotusedforalongtimeisevictedfirst.
LFU:Leastfrequentlyused.
Datathatisleastfrequentlyusedisevictedfirst.
NOTETheRDBfileformatofRedis5.
0ismodifiedandisbackwardcompatible.
Therefore,ifasnapshotisusedformigration,datacanbemigratedfromtheearlierRedisversionstoRedis5.
0,butcannotbemigratedfromtheRedis5.
0totheearlierversions.
1.
5HowDoIChooseBetweenArmandx86DCSforRedisfullysupportsbothArmandx86CPUarchitectures.
Theydonotdifferinfunctionsorclientcompatibility.
However,Kunpengandx86differinthefollowingaspects:SupportedRedisversions–Arm:Redis4.
0andRedis5.
0–x86:Redis3.
0,Redis4.
0,andRedis5.
0DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-1714Supportedinstancetypes–Arm:Single-node,master/standby,andRedisCluster–x86:Single-node,master/standby,Redis3.
0ProxyCluster,andRedis4.
0or5.
0RedisClusterPricesKunpeng-basedRedisis30%cheaperthanx86-basedRedis.
PerformancePerformanceofdifferentinstancespecificationsislistedinDCSInstanceSpecifications.
x86-basedRedisprovideshighersingle-CPUperformancethanArm-basedRedisinscenariosthatinvolvecomplexcommands,suchasbigkeysorkeyswhosetimecomplexityislargerthanO(N).
Inconclusion,bothArm-basedRedisandx86-basedRedisprovideperformancethatiscapableofmeetingyourservicerequirements,butArm-basedRedisismorecost-effective.
DistributedCacheServiceFAQs1InstanceTypes/Versions2020-03-17152ClientandNetworkConnection2.
1HowDoIConfigureaSecurityGroupThefollowingdescribeshowtoconfiguresecuritygroupsforintra-VPCaccessandpublicaccess.
Intra-VPCAccesstoDCSInstancesAnECScancommunicatewithaDCSinstanceiftheybelongtothesameVPCandsamesubnetandsecuritygrouprulesareconfiguredcorrectly.
IftheECSandDCSinstanceareconfiguredwiththesamesecuritygroup,networkaccessinthegroupisnotrestrictedbydefault.
IftheECSandDCSinstanceareconfiguredwithdifferentsecuritygroups,addsecuritygrouprulestoensurethattheECSandDCSinstancecanaccesseachother.
NOTESupposethattheECSonwhichtheclientrunsbelongstosecuritygroupsg-ECS,andtheDCSinstancethattheclientwillaccessbelongstosecuritygroupsg-DCS.
SupposethattheportnumberoftheDCSserviceis6379.
TheremoteendisasecuritygrouporanIPaddress.
a.
ConfiguringsecuritygroupfortheECS.
AddthefollowingoutboundruletoallowtheECStoaccesstheDCSinstance.
b.
ConfiguringsecuritygroupfortheDCSinstance.
ToensurethatyourclientcanaccesstheDCSinstance,addthefollowinginboundruletothesecuritygroupconfiguredfortheDCSinstance:DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1716NOTICEForthesourceIPaddress,usethespecifiedIPaddressoftheDCSinstance.
Avoidusing0.
0.
0.
0/0topreventECSsboundwiththesamesecuritygroupfrombeingattackedbyRedisvulnerabilityexploits.
PublicAccesstoDCSInstancesAclientcanaccessaDCSinstanceonlyafterrulesarecorrectlyconfiguredforthesecuritygroupoftheinstance.
Forexample,forsecuritygroupsg-DCS,youneedtoconfigurethefollowingrulesintheinbounddirection:Protocol:TCP;sourceIPaddress:0.
0.
0.
0/0oraspecifiedclientaddress.
WhenSSLisenabled,settheportnumberto36379.
WhenSSLisdisabled,settheportnumberto6379.
Figure2-1Securitygrouprule(port36379)Figure2-2Securitygrouprule(port6379)2.
2DoesDCSSupportPublicAccessRedis3.
0Currently,publicaccessissupportedonlybypassword-protectedDCSRedis3.
0instances.
YoucanenableordisableSSLforpublicaccess.
YouareDistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1717advisedtodownloadaCAcertificateinadvanceanduseittoverifythecertificateofaDCSinstanceforsecuritypurposes.
Formoreinformation,seePublicAccesstoaDCSRedisInstance.
Redis4.
0and5.
0PublicaccessisnotsupportedbyDCSRedis4.
0and5.
0instances.
Ifpublicaccessisrequired,useNginxtoredirectconnectionsthroughanECSconfiguredwiththesameVPCandsecuritygroupastheDCSinstance.
Fordetails,seeUsingNginxtoAccessDCSRedis4.
0or5.
0InstancesoverPublicNetworks.
MemcachedPublicaccessisnotsupported.
TheECSthatservesasaclientandtheDCSinstancethattheclientwillaccessmustbelongtothesameVPC.
Intheapplicationdevelopmentanddebuggingphase,youcanalsouseanSSHagenttoaccessDCSinstancesinthelocalenvironment.
2.
3TroubleshootingRedisConnectionExceptionsOverviewThistopicdescribeswhyRedisconnectionproblemsoccurandhowtosolvetheproblems.
ProblemClassificationTotroubleshootabnormalconnectionstoaRedisinstance,checkthefollowingitems:ConnectionBetweentheRedisInstanceandtheECSPublicAccessPasswordClientConnectionsBandwidthRedisPerformanceConnectionBetweentheRedisInstanceandtheECSTheECSwheretheclientislocatedmustbeinthesameVPCastheRedisinstanceandbeabletocommunicatewiththeRedisinstance.
ForaRedis3.
0instance,checkthesecuritygrouprulesoftheinstanceandtheECS.
CorrectlyconfiguresecuritygrouprulesfortheECSandtheRedisinstancetoallowtheRedisinstancetobeaccessed.
Fordetails,seeHowDoIConfigureaSecurityGroupForaDCSRedis4.
0or5.
0instance,checkthewhitelistoftheinstance.
Iftheinstancehasawhitelist,ensurethattheclientIPaddressisincludedinthewhitelist.
Otherwise,theconnectionwillfail.
Fordetails,seeManagingIPAddressWhitelist.
IftheclientIPaddresschanges,addthenewIPaddresstothewhitelist.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1718ChecktheregionsoftheRedisinstanceandtheECS.
IftheRedisinstanceandtheECSarenotinthesameregion,createanotherRedisinstanceinthesameregionastheECSandmigratedatafromtheoldinstancetothenewinstancebyreferringtoDataMigrationGuide.
ChecktheVPCsoftheRedisinstanceandtheECS.
DifferentVPCscannotcommunicatewitheachother.
AnECScannotaccessaRedisinstanceiftheyareindifferentVPCs.
YoucanestablishVPCpeeringconnectionstoallowtheECStoaccesstheRedisinstanceacrossVPCs.
FormoreinformationonhowtocreateanduseVPCpeeringconnections,seeVPCPeeringConnection.
PublicAccessBeforeaccessingaRedisinstancethroughapublicnetwork,ensurethattheinstancesupportspublicaccess.
Fordetails,seethepublicaccessexplanation.
Symptom:"Error:Connectionresetbypeer"isdisplayedoramessageisdisplayedindicatingthattheremotehostforciblyclosesanexistingconnection.
–Possiblecause1:Thesecuritygroupisincorrectlyconfigured.
Solution:CorrectlyconfiguretheRedisinstanceandaccesstheinstancebyfollowingthepublicaccessinstructions.
–Possiblecause2:SSLencryptionhasbeenenabled,butStunnelisnotconfiguredduringconnection.
Instead,theIPaddressdisplayedontheconsolewasusedforconnection.
Solution:WhenenablingSSLencryption,installandconfiguretheStunnelclient.
Fordetails,seeEnablingSSLEncryption.
InthecommandforconnectingtotheRedisinstance,theaddressmustbesettotheIPaddressandportnumberoftheStunnelclient.
Donotusethepublicaccessaddressandportdisplayedontheconsole.
Symptom:Publicaccesshasbeenautomaticallydisabled.
Cause:TheEIPboundtotheDCSRedisinstanceisunbound.
Asaresult,publicaccessisautomaticallydisabled.
Solution:EnablepublicaccessfortheinstanceandbindanEIPtotheinstanceonthemanagementconsole.
Then,tryagain.
PasswordIftheinstancepasswordisincorrect,theportcanstillbeaccessedbuttheauthenticationwillfail.
Ifyouforgetthepassword,youcanresetthepassword.
Fordetails,seeResettingInstancePasswords.
ClientConnectionsIftheconnectionfailswhenyouuseredis-clitoconnecttoaRedisClusterinstance,doasfollows:Checkwhether-cisaddedtotheconnectioncommand.
Ensurethatthecorrectconnectioncommandisusedwhenconnectingtotheclusternodes.
–RunthefollowingcommandtoconnecttoaRedisClusterinstance:.
/redis-cli-h{dcs_instance_address}-p6379-a{password}-cDistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1719–Runthefollowingcommandtoconnecttoasingle-node,master/standby,orProxyClusterinstance:.
/redis-cli-h{dcs_instance_address}-p6379-a{password}Fordetails,seeAccessUsingredis-cli.
Iferror"Readtimedout"or"Couldnotgetaresourcefromthepool"occurs,doasfollows:CheckiftheKEYScommandhasbeenused.
ThiscommandconsumesalotofresourcesandcaneasilyblockRedis.
Instead,usetheSCANcommandandavoidexecutingthecommandfrequently.
IfanerroroccurswhenyouusetheJedisconnectionpool,seeTroubleshootingaJedisConnectionPoolError.
BandwidthIfthebandwidthreachestheupperlimitofthecorrespondinginstancespecifications,Redisconnectionsmaytimeout.
YoucanviewtheFlowControlTimesmetrictocheckwhetherthebandwidthhasreachedtheupperlimit.
Then,checkwhethertheinstancehasbigkeysandhotkeys.
Ifasinglekeyistoolargeoroverloaded,operationsonthekeymayoccupytoomanybandwidthresources.
Fordetailsaboutbigkeysandhotkeys,seeAnalyzingBigKeysandHotKeys.
RedisPerformanceConnectionstoaninstancemaybecomeslowortimeoutiftheCPUusagespikesduetoresource-consumingcommandssuchasKEYS,ortoomuchmemoryisusedbecausetheexpirationtimeisnotsetfortheinstanceorexpiredkeysremaininthememory.
Inthesecases,doasfollows:UsetheSCANcommandinsteadoftheKEYScommand,ordisabletheKEYScommand.
Checkthemonitoringdataandconfigurealarmrules.
Fordetails,seeSettingAlarmRulesforCriticalMetrics.
Forexample,youcanviewtheMemoryUsageandUsedMemorymetricstokeeptrackoftheinstancememoryusage,andviewtheConnectedClientsmetrictodeterminewhethertheinstanceconnectionslimithasbeenreached.
Checkwhethertheinstancehasbigkeysandhotkeys.
Fordetailsabouttheoperationsofbigkeyandhotkeyanalysis,seeAnalyzingBigKeysandHotKeys.
2.
4DoesDCSSupportCross-VPCAccessCross-VPCmeanstheclientandtheinstancearenotinthesameVPC.
ThefollowingassumesthatpublicaccessisdisabledforaDCSinstance.
Generally,VPCsareisolatedfromeachotherandanECScannotaccessaDCSinstancethatbelongstoadifferentVPCfromtheECS.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1720However,byestablishingVPCpeeringconnectionsbetweenVPCs,anECScanaccessaDCSinstanceacrossVPCs.
WhenusingVPCpeeringconnectionstoaccessDCSinstancesacrossVPCs,adheretothefollowingrules:IfCIDRBlocks172.
16.
0.
0/12to172.
16.
0.
0/24areusedduringDCSinstancecreation,theclientcannotbeinanyofthefollowingCIDRBlocks:192.
168.
1.
0/24,192.
168.
2.
0/24,and192.
168.
3.
0/24.
IfCIDRBlocks192.
168.
0.
0/16to192.
168.
0.
0/24areusedduringDCSinstancecreation,theclientcannotbeinanyofthefollowingCIDRBlocks:172.
31.
1.
0/24,172.
31.
2.
0/24,and172.
31.
3.
0/24.
IfCIDRBlocks10.
0.
0.
0/8to10.
0.
0.
0/24areusedduringDCSinstancecreation,theclientcannotbeinanyofthefollowingCIDRBlocks:172.
31.
1.
0/24,172.
31.
2.
0/24,and172.
31.
3.
0/24.
FormoreinformationonhowtocreateanduseVPCpeeringconnections,seeVPCPeeringConnection.
2.
5WillIBeChargedfortheEIPUsedforPublicAccesstoaDCSRedisInstanceYes.
Beforeenablingpublicaccess,youmusthaveanavailableEIP.
Forthebillingdetails,seetheEIPpricingdetails.
2.
6HowCanIAccessDCSAcrossSub-projectsEnablepublicaccessfortheinstance.
2.
7WhyIs"(error)NOAUTHAuthenticationrequired"DisplayedWhenIAccessaDCSRedisInstanceThisisbecauseyouhaveenabledpassword-freeaccessfortheinstance.
Topreventtheerrormessagefromappearing,donotenteranypassword.
2.
8WhyDoesaRedisClusterDCSInstanceFailtoBePingedThePINGcommandisdisabledonthenodewheretheinstanceresides.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-17212.
9WhatShouldIDoIfAccesstoDCSFailsAfterServerDisconnectsAnalysis:Ifpersistentconnections("pconnect"inRedisterminology)orconnectionpoolingisusedandconnectionsareclosedafterbeingusedforconnectingtoDCSinstances,errorswillbereturnedatattemptstoreusetheconnections.
Solution:Whenusingpconnectorconnectionpooling,donotclosetheconnectionaftertheendofarequest.
Iftheconnectionisdropped,re-establishit.
2.
10WhyDoRequestsSometimesTimeOutinClientsOccasionaltimeouterrorsarenormalbecauseofnetworkconnectivityandclienttimeoutconfigurations.
Youareadvisedtoincludereconnectionoperationsintoyourservicecodetoavoidservicefailureifasinglerequestfails.
Ifaconnectionrequesttimesout,checkifAOFpersistencehasbeenenabled.
Toavoidblocking,ensurethatAOFhasbeenenabled.
Iftimeouterrorsoccurfrequently,contacttechnicalsupport.
2.
11WhatShouldIDoIfanErrorIsReturnedWhenIUsetheJedisConnectionPoolTheerrormessagethatwillpossiblybedisplayedwhenyouusetheJedisconnectionpoolisasfollows:redis.
clients.
jedis.
exceptions.
JedisConnectionException:CouldnotgetaresourcefromthepoolIfthiserrormessageisdisplayed,checkwhetheryourinstanceisrunningproperly.
Ifitisrunningproperly,performthefollowingchecks:Step1Checkthenetwork.
1.
ChecktheIPaddressconfigurations.
CheckwhethertheIPaddressconfiguredontheJedisclientisthesameasthesubnetaddressconfiguredforyourDCSinstance.
Ifpublicaccessisenabledforyourinstance,checkwhethertheIPaddressconfiguredontheJedisclientisthesameastheEIPboundtoyourinstance.
Iftheyareinconsistent,modifytheIPaddressconfigurationandthentryagain.
2.
Testthenetwork.
Usethepingcommandandtelnetontheclienttotestthenetwork.
–Ifthenetworkcannotbepinged:Forintra-VPCaccess,ensurethattheclientandyourDCSinstancebelongtothesameVPCandsecuritygroup,orthesecuritygroupofyourDCSinstanceallowsaccessthroughport6379.
Fordetails,seeSecurityGroupConfigurations.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1722ForpublicaccesswithSSL,ensurethatyouhaveconfiguredthesecuritygroupofyourDCSinstance,allowingaccessthroughport36379asinstructedinSecurityGroupConfigurations.
ForpublicaccesswithoutSSL,ensurethatyouhaveconfiguredthesecuritygroupofyourDCSinstance,allowingaccessthroughport6379asinstructedinSecurityGroupConfigurations.
–IftheIPaddresscanbepingedbuttelnetfailed,restartyourinstance.
Iftheproblempersistsaftertherestart,contacttechnicalsupport.
Step2Checkthenumberofconnections.
CheckwhetherthenumberofestablishednetworkconnectionsexceedstheupperlimitconfiguredfortheJedisconnectionpool.
Ifthenumberofestablishedconnectionsapproachestheconfiguredupperlimit,restarttheDCSserviceandcheckwhethertheproblempersists.
Ifthenumberofestablishedconnectionsisfarbelowtheupperlimit,continuewiththefollowingchecks.
InUnixorLinux,runthefollowingcommandtoquerythenumberofestablishednetworkconnections:netstat-an|grep6379|grepESTABLISHED|wc-lInWindows,runthefollowingcommandtoquerythenumberofestablishednetworkconnections:netstat-an|find"6379"|find"ESTABLISHED"/CStep3ChecktheJedisPoolcode.
Ifthenumberofestablishedconnectionsapproachestheupperlimit,determinewhethertheproblemiscausedbyserviceconcurrencyorincorrectusageofJedisPool.
WhenusingJedisPool,youmustcalljedisPool.
returnResource()orjedis.
close()(recommended)toreleasetheresourcesafteryoucalljedisPool.
getResource().
Step4CheckthenumberofTIME_WAITconnections.
Runthess-scommandtocheckwhethertherearetoomanyTIME_WAITconnectionsontheclient.
IftherearetoomanyTIME_WAITconnections,modifythekernelparametersbyrunningthe/etc/sysctl.
confcommandasfollows:##UsescookiestopreventsomeSYNfloodattackswhentheSYNwaitingqueueoverflows.
net.
ipv4.
tcp_syncookies=1##ReusesTIME_WAITsocketsfornewTCPconnections.
net.
ipv4.
tcp_tw_reuse=1##EnablesquickreclamationofTIME_WAITsocketsinTCPconnections.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1723net.
ipv4.
tcp_tw_recycle=1##Modifiesthedefaulttimeouttimeofthesystem.
net.
ipv4.
tcp_fin_timeout=30Afterthemodification,runthe/sbin/sysctl-pcommandforthemodificationtotakeeffect.
Step5Iftheproblempersistsafteryouperformtheprecedingchecks,performthefollowingsteps.
Capturepacketsandsendpacketfilesalongwiththetimeanddescriptionoftheexceptiontotechnicalsupportforanalysis.
Runthefollowingcommandtocapturepackets:tcpdump-ieth0tcpandport6379-n-nn-s74-wdump.
pcapInWindows,youcanalsoinstalltheWiresharktooltocapturepackets.
NOTEForpublicaccess,changetheportnumberto36379.
ReplacetheNICnametotheactualone.
----End2.
12WhyIs"ERRunknowncommand"DisplayedWhenIAccessaDCSRedisInstanceThroughaRedisClientThepossiblecausesareasfollows:1.
Thecommandisspelledincorrectly.
Asshowninthefollowingfigure,theerrormessageisreturnedbecausethecorrectcommandfordeletingastringshouldbedel.
2.
AcommandavailableinahigherRedisversionisruninalowerRedisversion.
Asshowninthefollowingfigure,theerrormessageisreturnedbecauseastreamcommand(availableinRedis5.
0)isruninRedis3.
0.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-17243.
Somecommandsaredisabled.
DCSRedisinstanceinterfacesarefullycompatiblewiththeopen-sourceRedisintermsofdataaccess.
However,foreaseofuseandsecuritypurposes,someoperationscannotbeinitiatedthroughRedisclients.
Fordetailsaboutdisabledcommands,seeRedisCommandCompatibility.
4.
ThefollowingcommandsaredisabledforclusterDCSRedisinstancescreatedbeforeJuly10,2018.
Youcanupgradesuchaninstancebysubmittingaserviceticket.
SINTER,SDIFF,SUNION,PFCOUNT,PFMERGE,SINTERSTORE,SUNIONSTORE,SDIFFSTORE,SMOVE,BLPOP,BRPOP,BRPOPLPUSH,ZUNIONSTORE,ZINTERSTORE,EVAL,EVALSHA,BITOP,RENAME,RENAMENX,RPOPLPUSH,MSETNX,SCRIPTLOAD,SCRIPTKILL,SCRIPTEXISTS,SCRIPTFLUSH5.
TheEVALcommandisnowcompatiblewithrecentsingle-nodeandmaster/standbyDCSRedisinstances.
Olderinstancesstilldonotsupportthecommand,and"ERRunknowncommand"willbedisplayedifEVALisrun.
Youcanupgradeolderinstancesbysubmittingaserviceticket.
Bewarethatduringtheupgrade,theRedisprocesseswillberestartedandtheserviceswillbeinterrupted.
2.
13HowDoIAccessaDCSRedisInstanceThroughRedisDesktopManagerYoucanaccessaDCSRedisinstancethroughtheRedisDesktopManagerwithinaVPCorovertheInternet.
WithinaVPC1.
Entertheaddress,portnumber(6379),andauthenticationpasswordoftheDCSinstanceyouwanttoaccess.
2.
ClickTestConnection.
Thesystemdisplaysasuccessmessageiftheconnectionissuccessful.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1725Figure2-3AccessingaDCSRedisinstancethroughRedisDesktopManagerovertheintranetNOTEWhenaccessingaclusterDCSinstance,theRediscommandisrunproperly,butanerrormessagemaydisplayontheleftbecauseDCSclustersarebasedonCodis,whichdiffersfromthenativeRedisintermsoftheINFOcommandoutput.
OvertheInternetCheckwhetherSSLisenabledfortheDCSinstanceyouwanttoaccess.
IfSSLisnotenabled,enterthepublicaccessaddressoftheinstance.
Configuretheinboundruleofthesecuritygroupoftheinstance,allowingaccessoverport6379.
IfSSLisenabled,installtheStunnelclientandthenconnecttotheRedisserverthroughRedisDesktopManager.
Note:–TheStunnelclientmustbeinstalled.
FordetailsabouthowtoinstallandconfiguretheStunnelclient,seeStunnelinstructions.
–Theaddressmustbesetto127.
0.
0.
1ratherthanthepublicIPaddress.
Otherwise,"connectionreset"willbereturned.
WhenSSLisenabled,RedisisaccessedthroughanencryptedchannelestablishedbyStunnel.
AfterarequestissentfromRedisDesktopManagertothelisteningportof127.
0.
0.
1,therequestisencryptedandsenttotheRedisinstancethroughport36379overapublicnetwork.
Configuretheinboundruleofthesecuritygroupoftheinstance,allowingaccessoverport36379.
ToenableSSL,disablepublicaccessfirst.
Then,enableSSLwhilere-enablingpublicaccess.
TodisableSSL,disablepublicaccessfirst.
Then,disableSSLwhilere-enablingpublicaccess.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-17262.
14WhatIf"ERRUnsupportedCONFIGsubcommand"isDisplayedinSpringCloudByusingDCSRedisinstances,SpringSessioncanimplementsessionsharing.
WheninterconnectingwithSpringCloud,thefollowingerrorinformationisdisplayed:Figure2-4SpringClouderrorinformationForsecuritypurposes,DCSdoesnotsupporttheCONFIGcommandinitiatedbyaclient.
Youneedtoperformthefollowingsteps:1.
OntheDCSconsole,setthevalueofthenotify-keyspace-eventparametertoEgxforaDCSRedisinstance.
2.
AddthefollowingcontenttotheXMLconfigurationfileoftheSpringframework:3.
ModifytherelatedSpringcode.
EnabletheConfigureRedisAction.
NO_OPbeancomponenttoforbidaclienttoinvoketheCONFIGcommand.
@BeanpublicstaticConfigureRedisActionconfigureRedisAction(){returnConfigureRedisAction.
NO_OP;}Formoreinformation,seetheSpringSessionDocumentation.
NOTICESessionsharingissupportedonlybysingle-nodeandmaster/standbyDCSRedisinstances,butnotbyclusterDCSRedisinstances.
2.
15WhyDoIFailtoAccessaDCSInstanceUsingItsDomainNameAddressIfaclientfailstoconnecttoaDCSinstanceusingthedomainnameaddress,settheDNSserveraddressofthesubnettotheprivateDNSserveraddress.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1727Fordetails,seeHowDoISwitchtoaPrivateDNSServer2.
16IsaPasswordRequiredforAccessinganInstanceHowDoISetaPasswordADCSRedisinstancecanbeaccesswithorwithoutapassword.
YoucandirectlyaccessaDCSRedisinstancethroughaRedisclientwithoutsettingapassword.
However,forsecuritypurposes,youareadvisedtosetapasswordforauthenticationandverificationwheneverpossible.
Thepasswordmustbesetwhenyoucreatetheinstance.
ADCSMemcachedinstancecanbeaccesswithorwithoutapassword.
YoucanselectanyMemcachedclientthatsupportstheMemcachedtextprotocolandbinaryprotocolbasedonspecificapplicationfeatures.
Thepasswordmustbesetwhenyoucreatetheinstance.
2.
17CanIAccessDCSInstancesinaLocalEnvironmentIfpublicaccessisdisabledforaDCSinstance,youcannotaccessitinlocalenvironmentsandcanonlyaccessitthroughanECSthatisinthesameVPCastheinstance.
VPCsareusedtoensurenetworksecurityofpubliccloudservices.
YoucanconnecttoaDCSinstancefromyourlocalenvironmentbyusinganECSthatcancommunicatewithyourinstanceforforwardingyourrequests.
Ifpublicaccessisenabled,DCSinstancescanbeaccessedinlocalenvironments.
Formoreinformation,seePublicAccesstoaDCSRedisInstance.
2.
18WhatShouldBeNotedWhenUsingRedisforPub/SubPayattentiontothefollowingissueswhenusingRedisforpub/sub:Yourclientmustprocessmessagesinatimelymanner.
Yourclientsubscribestoachannel.
Ifitdoesnotreceivemessagesinatimelymanner,DCSinstancemessagesmaybeoverstocked.
Ifthesizeofaccumulatedmessagesreachesthethreshold(32MBbydefault)orremainsatacertainlevel(8MBbydefault)foracertainperiodoftime(1minutebydefault),yourclientwillbeautomaticallydisconnectedtopreventservermemoryexhaustion.
Yourclientmustsupportconnectionre-establishmentincaseofdisconnection.
Intheeventofadisconnection,youneedtorunthesubscribeorpsubscribecommandonyourclienttosubscribetoachannelagain.
Otherwise,yourclientcannotreceivemessages.
Donotusepub/subinscenarioswithhighmessagereliabilityrequirements.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-1728TheRedispub/subisnotareliablemessagingsystem.
Messagesthatarenotretrievedwillbediscardedwhenyourclientisdisconnectedoramaster/standbyswitchoveroccurs.
2.
19WhyIsPublicAccessofMyDCSRedisInstanceUnintentionallyDisabledSymptom:PublicaccesshasbeenenabledforaDCSRedisinstancebutissuddenlydisabled.
Cause:TheEIPboundtotheDCSRedisinstanceisunbound.
Asaresult,publicaccessisautomaticallydisabled.
DistributedCacheServiceFAQs2ClientandNetworkConnection2020-03-17293RedisUsage3.
1WhyIsCPUUsageofaDCSRedisInstance100%Possiblecause1:TheserviceQPSissohighthattheCPUusagespikesto100%.
Possiblecause2:Youhaveruncommandsthatconsumealotofresources,suchasKEYS.
ThiswillmakeCPUusagespikeandcaneasilytriggeramaster/standbyswitchover.
Inthiscase,usetheSCANcommandinsteadordisabletheKEYScommand.
Possiblecause3:Thepersistencefunctionhasbeenenabledfortheinstance.
Ifthepersistencefunctionisnotrequired,disableitbygoingtotheParameterstabpageoftheinstanceandchangingthevalueofappendonlytono.
3.
2CanIChangetheVPCandSubnetforaDCSRedisInstanceNo.
Onceaninstanceiscreated,itsVPCandsubnetcannotbechanged.
IfyouwanttouseadifferentsetofVPCandsubnet,createasameinstanceandspecifyadesiredsetofVPCandsubnet.
Afterthenewinstanceiscreated,youcanmigratedatafromtheoldinstancetothenewinstancebyfollowingthedatamigrationinstructions.
3.
3WhyCan'tSecurityGroupsConfiguredforDCSRedis4.
0and5.
0InstancesCurrently,DCSRedis4.
0andRedis5.
0instancesuseVPCendpointsanddonotsupportsecuritygroups.
TorestrictaccesstoDCSReids4.
0and5.
0instancesfromspecifiedIPaddresses,youcanmanagetheIPaddresswhitelist.
DistributedCacheServiceFAQs3RedisUsage2020-03-17303.
4DoDCSRedisInstancesLimittheSizeofaKeyorValueThemaximumallowedsizeofakeyis512MB.
Toreducememoryusageandfacilitatekeyquery,ensurethateachkeydoesnotexceed1KB.
Themaximumallowedsizeofastringis512MB.
ThemaximumallowedsizeofaSet,List,orHashis512MB.
Inessence,aSetisacollectionofStrings;aListisalistofStrings;aHashcontainsmappingsbetweenstringfieldsandstringvalues.
PreventtheclientfromconstantlywritinglargevaluesinRedis.
Otherwise,networktransmissionefficiencywillbeloweredandtheRedisserverwouldtakealongertimetoprocesscommands,resultinginhigherlatency.
3.
5CanIObtaintheAddressesoftheNodesinaClusterDCSRedisInstanceClusterDCSRedis3.
0instances(ProxyClustertype)areusedinthesamewaythatyouusesingle-nodeormaster/standbyinstances.
Youdonotneedtoknowthebackendnodeaddresses.
ForaclusterDCSRedis4.
0or5.
0instance(RedisClustertype),runtheCLUSTERNODEScommandtoobtainnodeaddresses:redis-cli-h{redis_address}-p{redis_port}-a{redis_password}clusternodesIntheoutputsimilartothefollowing,obtaintheIPaddressesandportnumbersofallthemasternodes.
3.
6WhyIsAvailableMemorySmallerThanInstanceCacheSizeDCSRedis3.
0andMemcachedinstancesaredeployedonVMs,soasmallamountofmemoryisreservedforsystemoverheads.
ThisproblemdoesnotoccurinDCSRedis4.
0and5.
0instances.
3.
7DoesDCSforRedisSupportRead/WriteSplittingCurrently,read/writesplittingissupportedonlybyRedisClusterDCSinstancesandmaster/standbyDCSRedis4.
0or5.
0instances.
DistributedCacheServiceFAQs3RedisUsage2020-03-1731ForRedisClusterinstances,youcanqueryallmasterandreplicanodesbyrunningtheCLUSTERNODEScommand.
Theclientwillselecttherightnodetowriteorreaddata.
redis-cli-h{redis_address}-p{redis_port}-a{redis_password}clusternodesFormaster/standbyDCSRedis4.
0and5.
0instances,youcanquerytheread/writedomainnameaddress(masternode)andread/onlydomainnameaddress(standbynode)ontheinstancebasicinformationpage.
3.
8DoesDCSforRedisSupportMulti-DBBothsingle-nodeandmaster/standbyDCSRedisinstancessupportmultipledatabases(multi-DB).
Bydefault,single-nodeandmaster/standbyDCSinstancescanreadandwritedatain256databases(databasesnumbering0–255).
ThedefaultdatabaseisDB0.
Multi-DBisusedfordataisolation.
Thesizeofeachdatabaseisnotevenlyallocated.
Asaresult,oneDBmayfullyoccupythememoryoftheinstance.
ClusterDCSinstancesdonotsupportmulti-DB.
TheDBquantitycannotbemodified.
3.
9DoesDCSforRedisSupportRedisClustersYes.
DCSforRedis4.
0and5.
0supportRedisClusters.
DCSforRedis3.
0supportsProxyClusters.
3.
10DoesDCSforRedisSupportSentinelYes.
RedisSentinelissupportedbyDCSforRedis4.
0and5.
0andisenabledbydefault.
Sentinelconstantlychecksifmasterandreplicanodesarerunningproperly.
Ifthemasterisnotrunningproperly,Sentinelstartsafailoverprocessandpromotesareplicatomaster.
However,DCSforRedis3.
0doesnotsupportRedisSentinel.
Instead,ituseskeepalivetomonitormasterandreplicanodesandtomanagefailovers.
3.
11WhatIstheDefaultDataEvictionPolicyDataisevictedfromcachebasedonauser-definedspacelimitinordertomakespacefornewdata.
InthecurrentversionsofDCSforRedis,youcanselectanevictionpolicyyouprefer.
noevictionisthedefaultevictionpolicyforsingle-nodeandmaster/standbyDCSRedisinstances.
YoucanchangetheevictionpolicybyconfiguringtheinstanceparametersontheDCSconsole.
volatile-lruisthedefaultevictionpolicyforclusterDCSRedisinstances.
Tochangetheevictionpolicyforclusterinstances,submitaserviceticket.
Whenmaxmemoryisreached,youcanselectoneofthefollowingsixevictionpolicies:DistributedCacheServiceFAQs3RedisUsage2020-03-1732noeviction:Whenthememorylimitisreached,DCSinstancesreturnerrorstoclientsandnolongerprocesswriterequestsandotherrequeststhatcouldresultinmorememorytobeused.
However,DELandafewmoreexceptionrequestscancontinuetobeprocessed.
allkeys-lru:DCSinstancestrytoevicttheleastrecentlyusedkeysfirst,inordertomakespacefornewdata.
volatile-lru:DCSinstancestrytoevicttheleastrecentlyusedkeyswithanexpiresetfirst,inordertomakespacefornewdata.
allkeys-random:DCSinstancesrecyclerandomkeyssothatnewdatacanbestored.
volatile-random:DCSinstancesevictrandomkeyswithanexpireset,inordertomakespacefornewdata.
volatile-ttl:DCSinstancesevictkeyswithanexpireset,andtrytoevictkeyswithashortertimetolive(TTL)first,inordertomakespacefornewdata.
NOTEIfnokeycanberecycled,volatile-lru,volatile-random,andvolatile-ttlarethesameasnoeviction.
Fordetails,seethedescriptionofnoeviction.
3.
12WhatShouldIDoIfanErrorOccursinRedisExporterStarttheRedisexporterusingtheCLI.
Basedontheoutput,checkforerrorsandtroubleshootaccordingly.
3.
13WhyIsMemoryUsageMoreThan100%ThisisnormalduetoRedisfunctions(suchasmaster/replicareplicationandlazyfree).
Whenthememorybecomesfull,scaleuptheinstanceorremoveunnecessarydata.
3.
14HowCanISecureMyDCSRedisInstancesRedisisoneofthemostpowerfulandwidelyusedopen-sourcecachetechnologies.
However,theopen-sourceRedisdoesnothaverobustsecurityfeaturesofitsown.
ItisvulnerabletomaliciousInternetattacks,possiblycausingdatabreaches.
TosecureyourDCSRedisinstances,considertakingthefollowingadvice:Networkconnectionconfigurationsa.
Encryptsensitivedataanddisablepublicaccess.
Sensitivedatamustbeencryptedbeforebeingstored.
Donotenablepublicaccessunlessotherwiserequired.
DistributedCacheServiceFAQs3RedisUsage2020-03-1733b.
Configureaccessrulesforyoursecuritygroups.
SecuritygroupsandVPCsaredesignedforsecuringnetworkaccess.
Allowaccessoverasfewportsaspossibletoavoidrisks.
c.
ConfigureECSfirewalls.
ConfigurefirewallfilteringrulesfortheECSwhereyourclientruns.
d.
Settheinstancepassword.
redis-cliusagea.
Hidethepassword.
Problem:Ifthe-aoptionisused,thepasswordmayshowupwhenthepscommandisrun.
Solution:ModifytheRedissourcecode.
Hidethepasswordimmediatelyafterstartingredis-clibycallingthemainfunction.
b.
Disablesudoinrunningscripts.
Problem:Parametersforstartingredis-clicontainsensitivepatternsrelatedtothepassword,whichmayshowupwhenthepscommandisrunandmaybelogged.
Solution:AccesstheinstancebycallingAPIs(orthroughredis-pyinPython).
Donotallowswitchingtothedbuseruserusingsudoinredis-cli.
3.
15WhyIsRedissonDistributedLockNotSupportedbyDCSProxyClusterRedis3.
0InstancesRedissonimplementslockacquisitionandunlockinginthefollowingprocess:1.
RedissonlockacquisitionandunlockingareimplementedbyrunningLuascripts.
2.
Duringlockacquisition,theEXISTS,HSET,PEXPIRE,HEXISTS,HINCRBY,PEXPIRE,andPTTLcommandsmustbeexecutedintheLuascript.
3.
Duringunlocking,theEXISTS,PUBLISH,HEXISTS,PEXIPRE,andDELcommandsmustbeexecutedintheLuascript.
Inaproxy-basedcluster,theproxyprocessesPUBLISHandSUBSCRIBEcommandsandforwardsrequeststotheRedisserver.
ThePUBLISHcommandcannotbeexecutedintheLuascript.
Asaresult,ProxyClusterDCSRedis3.
0instancesdonotsupportRedissondistributedlocks.
TouseRedisson,resorttoRedis4.
0or5.
0instead.
3.
16CanICustomizeorChangethePortforAccessingaDCSInstanceYoucannotcustomizeorchangetheportforaccessingaDCSRedis3.
0orMemcachedinstance.
YoucancustomizebutcannotchangetheportforaccessingaDCSRedis4.
0or5.
0instance.
Redis3.
0DistributedCacheServiceFAQs3RedisUsage2020-03-1734Intra-VPCaccess:port6379;publicaccesswithoutSSL:port6379;publicaccesswithSSL:port36379.
MemcachedUseport11211forintra-VPCaccess.
Publicaccessisnotsupported.
Redis4.
0andRedis5.
0Youcanspecifyaport(rangingfrom1to65535)orusethedefaultport(6379)foraccessingaDCSRedis4.
0or5.
0instance.
Ifnoportisspecified,thedefaultportwillbeused.
Publicaccessisnotsupported.
Iftheinstanceandtheclientareindifferentsecuritygroups,youmustconfigureaccessrulesforthesecuritygroups,allowingaccessthroughthespecifiedport.
Fordetails,seeHowDoIConfigureaSecurityGroup.
3.
17CanIModifytheConnectionAddressesforAccessingaDCSInstanceAfteraDCSinstanceiscreated,itsconnectionaddressesforintra-VPCaccesscannotbemodified.
Ifpublicaccesshasbeenenabledfortheinstance,theelasticIPaddress(EIP)boundtotheinstancecanbemodified.
Tousedifferentconnectionaddresses,youmustcreateanewinstanceandmanuallyspecifyanIPaddress.
Aftertheinstanceiscreated,migratethedatafromtheoldinstancetothenewinstance.
3.
18WhyDoIFailtoDeleteanInstancePossiblecausesandsolutions:TheinstanceisnotintheRunningstate.
OnlyinstancesintheRunningstatecanbedeleted.
Checkwhethertheinstancefailstobecreated.
Todeleteinstancesthatfailedtobecreated,clickthenumbernexttoInstanceCreationFailuresontheDCSconsole.
3.
19DoesDCSSupportCross-AZDeploymentMaster/StandbyandclusterDCSRedisinstancesandDCSMemcachedinstancescanbedeployedacrossavailabilityzones(AZs).
IfinstancesnodesinanAZarefaulty,nodesinotherAZswillnotbeaffected.
Thestandbynodeautomaticallybecomesthemasternodetocontinuetooperate,ensuringdisasterrecovery(DR).
Cross-AZdeploymentdoesnotcompromisethespeedofdatasynchronizationbetweenthemasterandstandbynodes.
DistributedCacheServiceFAQs3RedisUsage2020-03-17353.
20WhyDoesItTakeaLongTimetoStartaClusterDCSInstancePossiblecause:Whenaclusterinstanceisstarted,statusanddataaresynchronizedbetweenthenodesoftheinstance.
Ifalargeamountofdataiscontinuouslywrittenintotheinstancebeforethesynchronizationiscomplete,thesynchronizationwillbeprolongedandtheinstanceremainsintheStartingstate.
Afterthesynchronizationiscomplete,theinstanceenterstheRunningstate.
Solution:Startwritingdatatoaninstanceonlyaftertheinstancehasbeenstarted.
3.
21WhatIfRedisCommandsAreIncompatiblewithDCSforRedisYoucanverifywhetherthecommandsusedbyyourapplicationsarecompatiblewithDCSbyanalyzingyourservicecommandsorpurchaseapay-per-useDCSinstancefortrialuse.
1.
DCSforRedis3.
0hasintegratedRedis4.
0commands,whichcanbeusedproperlyinmostcases.
However,somecommandsarenotsupportedoraredisabled.
Fordetails,seeRedisCommandCompatibility.
2.
DCSforRedis3.
0doesnotsupportRedis5.
0commands,suchasStreamcommands.
3.
22DoesDCSforRedisProvideBackendManagementSoftwareNo.
ToqueryRedisconfigurationsandusageinformation,useredis-cli.
IfyouwishtomonitorDCSRedisinstancemetrics,gototheCloudEyeconsole.
Fordetailsonhowtoconfigureandviewthemetrics,seetheMonitoringchapterintheDCSUserGuide.
3.
23WhyIsMemoryofaDCSRedisInstanceUsedUpbyJustaFewKeysPossiblecause:Theoutputbuffermayhaveoccupiedanexcessiveamountofmemory.
Solution:Afterconnectingtotheinstanceusingredis-cli,runtheredis-cli--bigkeyscommandtoscanthelargekey.
Then,runtheinfocommandtochecktheoutputbuffersize.
3.
24CanIRecoverDatafromDeletedDCSInstancesIfaDCSinstanceisautomaticallydeletedormanuallydeletedthroughtheRedisclient,itsdatacannotberetrieved.
Ifyouhavebackeduptheinstance,youcanDistributedCacheServiceFAQs3RedisUsage2020-03-1736restoreitsdatafromthebackup.
However,therestorationwilloverwritethedatawritteninduringtheperiodfromthebackupandtherestoration.
Bydefault,dataisnotevictedfromDCSinstances.
Youcanmodifytheinstanceconfigurationparameterstoadjusttheevictionpolicysothattheinstancecanevictkeyvalues.
3.
25DoesDCSforRedisSupportSSLEncryptionTheopen-sourceRedisdoesnotsupportSSL-encryptedconnections.
However,DCSforRedis3.
0instancessupportSSL-encryptedconnectionsifyouhaveenabledpublicaccessandinstalledtheStunnelclient.
Ifpublicaccessisnotenabled,SSLencryptioncannotbeconfiguredintheStunnelclient.
3.
26HowDoIEnableorDisableSSLforPublicAccesstoaDCSRedisInstanceWhenyouenablepublicaccess,SSLisenabledbydefault.
Onceaninstanceiscreatedwithpublicaccessenabled,theSSLsettingcannotbechanged.
IfyouneedtodisableSSLaftertheinstancehasbeencreated,performthefollowingsteps:1.
Disablepublicaccessasshownbelow.
Figure3-1DisablingpublicaccessWaituntilpublicaccesshasbeendisabled.
DistributedCacheServiceFAQs3RedisUsage2020-03-17372.
Re-enablepublicaccess.
Duringthisstep,disableSSLasshownbelow.
Figure3-2DisablingSSLwhileenablingpublicaccess3.
27WhyIsMemoryUsageofaDCSInstance100%Possiblecause1:Theexpirationtimeisnotsetfortheinstance.
Asaresult,alargeamountofdataisstored.
Inthiscase,logintotheDCSconsoletoperformbigkeyanalysisontheCacheAnalysispageandqueryslowlogsontheSlowLogpage.
Iftheexpirationtimeisnotsetfortheinstance,datastoredintheinstancewilluseupthememory.
Possiblecause2:DuetothelazyfreefeatureofRedis,expiredkeysmaystayinthememory.
3.
28WhyIsAvailableMemoryofUnusedDCSInstancesLessThanTotalMemoryandWhyIsMemoryUsageofUnusedDCSInstancesGreaterThanZeroTheavailablememoryislessthanthetotalmemorybecausesomememoryisreservedforsystemoverheadanddatapersistence(supportedbymaster/standbyinstances).
DCSinstancesuseacertainamountofmemoryforRedis-serverbuffersandinternaldatastructures.
ThisiswhymemoryusageofunusedDCSinstancesisgreaterthanzero.
DistributedCacheServiceFAQs3RedisUsage2020-03-17383.
29HowDoIEstimateRedisMemoryUsageTheestimatedmemoryusagemaybedifferentfromtheactualmemoryusage.
Currently,DCSforRedisprovidesthefollowingmemory-relatedmetrics:Table3-1DCSRedis3.
0instancemetricsMetricIDMetricNameDescriptionValueRangeMonitoredObjectandDimensionMonitoringPeriod(RawData)memory_usageMemoryUsageMemoryconsumedbythemonitoredobjectUnit:%0–100%Monitoredobject:Single-node,master/standby,orclusterDCSRedisinstanceDimension:dcs_instance_id1minuteused_memoryUsedMemoryNumberofbytesusedbytheRedisserverUnit:byte≥0Monitoredobject:Single-node,master/standby,orclusterDCSRedisinstanceDimension:dcs_instance_id1minuteDistributedCacheServiceFAQs3RedisUsage2020-03-1739MetricIDMetricNameDescriptionValueRangeMonitoredObjectandDimensionMonitoringPeriod(RawData)used_memory_datasetUsedMemoryDatasetDatasetmemorythattheRedisserverhasusedUnit:byte≥0Monitoredobject:Single-node,master/standby,orclusterDCSRedisinstanceSupportedbyRedis4.
0andlaterDimension:dcs_instance_id1minuteused_memory_dataset_percUsedMemoryDatasetRatioPercentageofdatasetmemorythattheRedisserverhasusedUnit:%0–100%Monitoredobject:Single-node,master/standby,orclusterDCSRedisinstanceSupportedbyRedis4.
0andlaterDimension:dcs_instance_id1minuteused_memory_rssUsedMemoryRSSResidentsetsize(RSS)memorythattheRedisserverhasused,whichisthememorythatactuallyresidesinthememory,includingallstackandheapmemorybutnotswapped-outmemoryUnit:byte≥0Monitoredobject:Single-node,master/standby,orclusterDCSRedisinstanceDimension:dcs_instance_id1minuteDistributedCacheServiceFAQs3RedisUsage2020-03-1740MetricIDMetricNameDescriptionValueRangeMonitoredObjectandDimensionMonitoringPeriod(RawData)memory_frag_ratioMemoryFragmentationRatioCurrentmemoryfragmentation,whichistheratiobetweenused_memory_rss/used_memory.
≥0Monitoredobject:Single-node,master/standby,orclusterDCSRedisinstanceDimension:dcs_instance_id1minuteused_memory_peakUsedMemoryPeakPeakmemoryconsumedbyRedissincetheRedisserverlaststartedUnit:byte≥0Monitoredobject:Single-node,master/standby,orclusterDCSRedisinstanceDimension:dcs_instance_id1minuteused_memory_luaUsedMemoryLuaNumberofbytesusedbytheLuaengineUnit:byte≥0Monitoredobject:Single-node,master/standby,orclusterDCSRedisinstanceDimension:dcs_instance_id1minuteDistributedCacheServiceFAQs3RedisUsage2020-03-17413.
30WhyIstheCapacityorPerformanceofaShardofaRedisClusterInstanceOverloadedWhenThatoftheInstanceIsStillBelowtheBottleneckRedisClusterusesaspecialdatashardingmethod.
Everykeyispartofahashslot,whichisheldbyanodeinthecluster.
Tocomputewhatisthehashslotofagivenkey:1.
TaketheCRC16ofthekeymodulo16384.
2.
Basedonthemappingbetweenhashslotsandshards,connectionsareredirectedtotherightnodefordatareadandwriteoperations.
Therefore,keysarenotevenlydistributedtoeachshardofaninstance.
Ifashardcontainsabigkeyorahotkey,thecapacityorperformanceoftheshardwillbeoverloaded,buttheloadonothershardsisstilllow.
Asaresult,thecapacityorperformancebottleneckoftheentireinstanceisnotreached.
3.
31DoesDCSSupportExternalExtensions,Plug-ins,orModulesNo.
Currently,DCSforRedisdoesnotsupportexternalextensions,plug-ins,ormodules.
DistributedCacheServiceFAQs3RedisUsage2020-03-17424InstanceScalingandUpgrade4.
1CanDCSRedisInstancesBeUpgraded,forExample,fromRedis3.
0toRedis4.
0or5.
0No.
DifferentRedisversionsusedifferentunderlyingarchitectures.
TheRedisversionusedbyaDCSinstancecannotbechangedoncetheinstanceiscreated.
IfyourservicerequiresthefeaturesofhigherRedisversions,createanewDCSRedisinstanceofahigherversionandthenmigratedatafromtheoriginalinstancetothenewone.
Fordetailsonhowtomigratedata,seetheDataMigrationGuide.
4.
2AreServicesInterruptedIfMaintenanceisPerformedDuringtheMaintenanceTimeWindowO&Mpersonnelwillcontactyoubeforeperformingmaintenanceduringthemaintenancetimewindow,informingyouoftheoperationsandtheirimpacts.
Youdonotneedtoworryaboutinstancerunningexceptions.
4.
3AreInstanceResourcesAffectedDuringSpecificationModificationNo.
Specificationmodificationscantakeplacewhiletheinstanceisrunninganddonotaffectanyotherresources.
4.
4CanIChangeaSingle-NodeDCSRedisInstancetotheMaster/StandbyorClusterTypeAsingle-nodeDCSRedis3.
0canbechangedtothemaster/standbytype.
Amaster/standbyDCSRedis3.
0instancecanbechangedtotheProxyClustertype.
TheinstancetypeofaDCSRedis4.
0and5.
0instancecannotbechanged.
DistributedCacheServiceFAQs4InstanceScalingandUpgrade2020-03-1743Tocheckwhetheryoucanchangetheinstancetypeforaninstance,seetheparametersdisplayedontheModifySpecificationspageontheDCSconsole.
Thefollowingscenarioshowsthattheinstancetypecanbechanged.
4.
5AreServicesInterruptedDuringSpecificationModificationYouareadvisedtochangetheinstancespecificationsduringoff-peakhoursbecausespecificationmodificationhasthefollowingimpacts:Impactofinstancetypechanges:–Fromsingle-nodetomaster/standby:Theinstancecannotbeconnectedforseveralsecondandremainsread-onlyforabout1minute.
–Frommaster/standbytoProxyCluster:Theinstancecannotbeconnectedandremainsread-onlyfor5to30minutes.
Impactofcapacityexpansionandreduction:–Single-nodeandmaster/standby:Theinstancecannotbeconnectedforseveralsecondandremainsread-onlyforabout1minute.
Forcapacityexpansion,onlythememoryoftheinstanceisexpanded.
TheCPUprocessingcapabilityisnotimproved.
Dataofsingle-nodeinstancesmaynotberetainedbecausetheydonotsupportdatapersistence.
Afterthescaling,checkwhetherthedataiscompleteandimportdataifrequired.
–ProxyCluster:Theinstancecanbeconnected,buttheCPUwillbeoccupiedandthelatencywillincreaseduringdatamigration.
Duringcapacityexpansion,DistributedCacheServiceFAQs4InstanceScalingandUpgrade2020-03-1744newRedisServernodesareadded,anddataisautomaticallybalancedtothenewnodes.
Backuprecordscreatedbeforethecapacitychangecannotberestored.
–RedisCluster:Theinstancecanbeconnected,buttheCPUusagewillincreaseandthelatencywillincreaseduringdatamigration.
Duringcapacityexpansion,newRedisServernodesareadded,anddataisautomaticallybalancedtothenewnodes.
4.
6WhyDoIFailtoModifytheSpecificationsforaDCSInstanceCheckwhetherothertasksarerunning.
SpecificationsofaDCSinstancecannotbemodifiedifanothertaskoftheinstanceisstillrunning.
Forexample,youcannotdeleteorscaleupaninstancewhileitisbeingrestarted.
Likewise,youcannotdeleteaninstancewhileitisbeingscaledup.
Ifthespecificationmodificationfails,tryagainlater.
Ifitfailsagain,contacttechnicalsupport.
Whenchangingamaster/standbyinstancetotheProxyClustertype,checkwhetherdataexistsinDBsotherthanDB0.
SpecificationmodificationwillfailifaDBotherthanDB0containsdata.
Amaster/standbyinstancecanbechangedtotheProxyClustertypewhendataexistsonlyinDB0.
4.
7HowDoIReducetheCapacityofaClusterDCSInstanceNo.
Capacityreductionissupportedonlyforsingle-nodeandmaster/standbyinstances.
ThecapacityofaProxyClusterorRedisClusterinstancecanonlybeexpanded,andcannotbereduced.
IfyouwanttouseasmallerProxyClusterinstance,backupthedataoftheexistinginstance,andcreateanewProxyClusterinstancewiththedesiredcapacity.
Then,importthebackupdatatothenewinstance.
Afterthedatamigrationiscomplete,deletetheoldinstance.
Fordetailsaboutdatamigrationoperations,seeImportingBackupFiles.
IfyouwanttouseasmallerRedisClusterinstance,createanewRedisClusterinstancewiththedesiredcapacity,andmigratedataonlinefromtheoldinstancetothenewinstance.
Afterthemigrationiscomplete,deletetheoldinstance.
Fordetailsaboutdatamigrationoperations,seeMigratingDataOnline.
DistributedCacheServiceFAQs4InstanceScalingandUpgrade2020-03-17455DataBackup,Export,andMigration5.
1HowDoIExportDCSRedisInstanceDataFormaster/standbyorclusterinstances:Performthefollowingoperationstoexportthedata:a.
OntheBackupsandRestorationspage,viewthebackuptasks.
b.
Ifthereisnobackup,createabackupanddownloadthebackupfileasprompted.
NOTEIfyourDCSinstanceswerecreatedalongtimeago,theversionsoftheseinstancesmaynotbeadvancedenoughtosupportsomenewfunctions(suchasbackupandrestoration).
YoucancontacttechnicalsupporttoupgradeyourDCSinstances.
Aftertheupgrade,youcanbackupandrestoreyourinstances.
Forsingle-nodeinstances:Single-nodeinstancesdonotsupportthebackupfunction.
Youcanuseredis-clitoexportRDBfiles.
ThisoperationdependsonSYNCcommand.
–IftheinstanceallowstheSYNCcommand(suchasaRedis3.
0single-nodeinstance),runthefollowingcommandtoexporttheinstancedata:redis-cli-h{source_redis_address}-p6379[-apassword]--rdb{output.
rdb}–IftheinstancedoesnotallowtheSYNCcommand(suchasaRedis4.
0or5.
0single-nodeinstance),migratetheinstancedatatoamaster/standbyinstanceandexportthedatabyusingthebackupfunction.
5.
2WhyIsMemoryofaDCSRedisInstanceUnchangedAfterDataMigrationUsingRump,EvenIfNoErrorMessageIsReturnedFordetailsonhowtouseRump,seetheDataMigrationGuide.
Possiblecauses:DistributedCacheServiceFAQs5DataBackup,Export,andMigration2020-03-1746RumpdoesnotsupportmigrationtoclusterDCSinstances.
CommandsareincorrectlyruninRump.
5.
3CanIExportBackupDataofDCSRedisInstancestoRDBFilesontheConsoleRedis3.
0No.
Ontheconsole,backupdataofaDCSRedis3.
0instancecanbeexportedonlytoAOFfiles.
ToexportdatatoRDBfiles,runthefollowingcommandinredis-cli:redis-cli-h{redis_address}-p6379[-apassword]--rdb{output.
rdb}Redis4.
0and5.
0Yes.
BackupdataofaDCSRedis4.
0or5.
0instanceisexportedfromtheconsoletoRDBfiles.
Youcannotuseredis-clitoexportsuchdatatoRDBfiles.
5.
4WhyAreProcessesFrequentlyKilledDuringDataMigrationPossiblecause:Thememoryisinsufficient.
Solution:Expandthememoryoftheserveronwhichthemigrationcommandisexecuted.
5.
5WhereAreDCSInstanceBackupFilesStoredHowAreTheyChargedThebackupfilesarekeptbyObjectStorageService(OBS).
Currently,DCSbackupoperationsarefreeofcharge,butOBSchargesforthestoragebasedonthestoragespaceandduration.
5.
6IsAllDatainaDCSRedisInstanceMigratedDuringOnlineMigrationMigrationbetweensingle-nodeandmaster/standbyinstancesinvolvesthefullsetofdata.
AllDBswillbemigrated,andyoucannotmigratespecifiedDBs.
Afterthemigration,agivenkeywillremaininthesameDBasitwasbeforethemigration.
Bycontrast,aclusterinstanceonlyhasoneDB,whichisDB0.
Duringthemigration,datainallslotsofDB0ismigrated.
5.
7DoesDCSSupportDataPersistence1.
DCSRedisinstances:–Single-node:NotsupportedDistributedCacheServiceFAQs5DataBackup,Export,andMigration2020-03-1747–Master/Standbyandcluster:Supported2.
DCSMemcachedinstances:–Single-node:Notsupported–Master/Standby:Supported5.
8WhyDoesDataMigrationFailCheckifamaster/standbyswitchoveroccurredduringthemigration.
Ifitoccurred,contacttechnicalsupporttotemporarilydisablemaster/standbyswitchoveruntilthemigrationcompletes.
Foronlinemigration,checkwhethertheSYNCandPSYNCcommandsaredisabledonthesourceRedisinstance.
Iftheyaredisabled,enablethemtoallowdatasynchronization.
Tomigratedatafromasingle-nodeormaster/standbyinstancetoaProxyClusterinstance,checkifanydataexistsindatabasesotherthanDB0ofthesourceinstance.
Ifyes,movethedatatoDB0.
Otherwise,themigrationfails.
AProxyClusteronlyhasoneDB,whichisDB0.
DistributedCacheServiceFAQs5DataBackup,Export,andMigration2020-03-17486AnalysisofBigKeysandHotKeys6.
1WhatIstheImpactofaBigKeyAbigkeyoccupiesalargeamountofbandwidthandmemoryresources,affectingotherkeyoperations.
6.
2WhatIstheImpactofaHotKeyAhotkeyoccupiesalargeamountofCPUandbandwidthresources,affectingotherkeyoperations.
6.
3HowDoIAvoidBigKeysandHotKeysKeepthesizeofStringswithin10KBandthequantityofHashes,Lists,Sets,orZsetswithin5000.
Whennamingkeys,usetheservicenameabbreviationastheprefixanddonotusespecialcharacterssuchasspaces,linebrakes,singleordoublequotationmarks,andotherescapecharacters.
DonotrelytoomuchonRedistransactions.
Theperformanceofshortconnectionsispoor.
Useclientswithconnectionpools.
DonotenabledatapersistenceifyouuseRedisjustforcachingandcantoleratedatalosses.
6.
4HowDoIAnalyzetheHotKeysofaDCSRedis3.
0InstanceDCSforRedis3.
0doesnotsupporthotkeyanalysisontheconsole.
Alternatively,youcanusethefollowingmethodstoanalyzehotkeys:Method1:Analyzetheservicestructureandserviceimplementationtodiscoverpossiblehotkeys.
DistributedCacheServiceFAQs6AnalysisofBigKeysandHotKeys2020-03-1749Forexample,hotkeyscaneasilybefoundintheservicecodeduringflashsalesoruserlogins.
Advantage:Simpleandeasytoimplement.
Disadvantage:Requiresfamiliaritywiththeservicecode.
Inaddition,theanalysisbecomemoredifficultastheservicescenariosbecomemorecomplex.
Method2:Collectkeyaccessstatisticsintheclientcodetodiscoverhotkeys.
Disadvantage:Requiresintrusivecodemodification.
Method3:Captureandanalyzepackets.
Advantage:Simpleandeasytoimplement.
6.
5HowDoIDetectBigKeysandHotKeysinAdvanceConfigurealarmrulesfortheMemoryUsagemetricoftheinstancenodes.
Ifanodehasabigkey,thememoryusageofthenodeismuchhigherthanthatofothernodes.
Inthiscase,analarmistriggeredtohelpyoufindthepotentiallyproblematickey.
ConfigurealarmrulesfortheMaximumInboundBandwidth,MaximumOutboundBandwidth,andCPUUsagemetricsoftheinstancenodes.
Ifanodehasahotkey,thebandwidthandCPUusageofthenodeismuchhigherthanthatofothernodes.
Inthiscase,analarmistriggeredtohelpyoufindthepotentiallyproblematickey.
TheprecedingmethodfordiscoveringhotkeyscanbeusedforDCSRedis3.
0instances,becausehotkeyanalysisisnotsupportedbyDCSRedis3.
0instances.
Fordetailsaboutsettingalarmrules,seeSettingAlarmRulesforCriticalMetrics.
Fordetailsabouttheoperationsofbigkeyandhotkeyanalysis,seeAnalyzingBigKeysandHotKeys.
DistributedCacheServiceFAQs6AnalysisofBigKeysandHotKeys2020-03-17507RedisCommands7.
1HowDoIClearRedisDataExercisecautionwhenclearingdata.
Redis3.
0DataofaDCSRedis3.
0instancecannotbeclearedontheconsole,andcanonlybeclearedbytheFLUSHDBorFLUSHALLcommandinredis-cli.
RuntheFLUSHALLcommandtoclearallthedataintheinstance.
RuntheFLUSHDBcommandtoclearthedatainthecurrentlyselectedDB.
Redis4.
0and5.
0DataofaDCSRedis4.
0or5.
0instancecanbeclearedallatonceontheconsoleorbytheFLUSHDBorFLUSHALLcommandinredis-cli.
TocleardataofaRedisClusterinstance,runtheFLUSHDBorFLUSHALLcommandoneveryshardoftheinstance.
Otherwise,datamaynotbecompletelycleared.
7.
2HowDoIFindSpecifiedKeysandTraverseAllKeysFindingSpecifiedKeysBigkeyandhotkeyanalysisdoesnotsupportkeysearchingwithspecifiedconditions.
Tofindkeyswiththespecifiedprefixorsuffix,usetheSCANcommand.
Forexample,tosearchforkeysthatcontaintheletterainaRedisinstance,runthefollowingcommandinredis-cli:.
/redis-cli-h{redis_address}-p{port}[-apassword]--scan--pattern'*a*'DistributedCacheServiceFAQs7RedisCommands2020-03-1751TraversingAllKeysDonotusetheKEYScommandtotraverseallkeysofaninstancebecausetheKEYScommandiscomplexandmayblockRedis.
TotraverseallkeysinaRedisinstance,runthefollowingcommandinredis-cli:.
/redis-cli-h{redis_address}-p{port}[-apassword]--scan--pattern'*'FordetailsabouttheSCANcommand,visittheRedisofficialwebsite.
7.
3WhyDoIFailtoExecuteSomeRedisCommandsPossiblecausesincludethefollowing:Thecommandisincorrect.
ThecommandisdisabledinDCS.
Forsecuritypurposes,someRediscommandsaredisabledinDCS.
FordetailsaboutdisabledandrestrictedRediscommands,seeRedisCommandCompatibility.
ThecommandcannotbeexecutedinWebCLI.
InadditiontothedisabledandrestrictedRediscommands,theKEYScommandsisalsorestrictedinWebCLI.
TheLUAscriptfailstobeexecuted.
Forexample,theerrormessage"ERRunknowncommand'EVAL'"indicatesthatyourDCSRedisinstanceisofalowerversionthatdoesnotsupporttheLUAscript.
Inthiscase,submitaserviceticketfortheinstancetobeupgraded.
TheCLIENTSETNAMEandCLIENTGETNAMEcommandsfailtobeexecuted.
TheDCSRedisinstanceisofalowerversionthatdoesnotsupportthesecommands.
Inthiscase,submitaserviceticketfortheinstancetobeupgraded.
7.
4Whyis"permissiondenied"ReturnedWhenIRuntheKeysCommandinWebCLITheKEYScommandisdisabledinWebCLI.
Thiscommandcanonlyberuninredis-cli.
7.
5HowDoIRenameHigh-RiskCommandsCurrently,youcanonlyrenamethefollowingcriticalcommands:COMMAND,KEYS,FLUSHDB,FLUSHALL,andHGETALLforDCSRedis4.
0and5.
0instances.
Thesecommandscanberenamedduringinstancecreationorbyusingthecommandrenamingfunctionontheconsoleaftertheinstanceiscreated.
Therenamingtakeseffectaftertheinstanceisrestarted.
DistributedCacheServiceFAQs7RedisCommands2020-03-17527.
6DoesDCSforRedisSupportPipeliningYes.
ForDCSRedis4.
0and5.
0instancesintheRedisClustermode,ensurethatallcommandsinapipelineareexecutedonthesameshard.
7.
7DoesDCSforRedisSupporttheINCRandEXPIRECommandsYes.
FormoreinformationaboutRediscommandcompatibility,seeRedisCommandCompatibility.
7.
8WhyDoesaRedisCommandFailtoTakeEffectRunthecommandinredis-clitocheckwhetherthecommandtakeseffect.
Thefollowingdescribestwoscenarios:Scenario1:SetandquerythevalueofakeytocheckwhethertheSETandGETcommandswork.
TheSETcommandisusedtosetthestringvalue.
Ifthevalueisnotchanged,runthefollowingcommandsinredis-clitoaccesstheinstance:Scenario2:IfthetimeoutsetusingtheEXPIREcommandisincorrect,performthefollowingoperations:Setthetimeoutto10secondsandruntheTTLcommandtoviewtheremainingtime.
Asshowninthefollowingexample,theremainingtimeis7seconds.
NOTERedisclients(includingredis-cli,Jedisclients,andPythonclients)communicatewithRedisserverusingabinaryprotocol.
IfRediscommandsarerunproperlyinredis-cli,theproblemmaylieintheservicecode.
Inthiscase,createlogsinthecodeforfurtheranalysis.
DistributedCacheServiceFAQs7RedisCommands2020-03-17537.
9IsThereaTimeLimitonExecutingRedisCommandsWhatWillHappenIfaCommandTimesOutThetimelimitforexecutingaRediscommandis1minute.
Thislimitcannotbeconfigured.
Aftertheexecutionofacommandtimesout,yourclientwillbeautomaticallydisconnected.
7.
10CanIConfigureRedisKeystoBeCase-InsensitiveNo.
Likeinopen-sourceRedis,keysinDCSforRedisarecase-sensitive.
7.
11CanIViewtheMostFrequentlyUsedRedisCommandsNo.
Redisdoesnotrecordcommandsanddoesnotsupportviewingtopcommands.
DistributedCacheServiceFAQs7RedisCommands2020-03-17548MonitoringandAlarm8.
1HowDoIViewConcurrentConnectionsofaDCSRedisInstanceThenumberofconnectionsreceivedbyaDCSinstanceisametricthatcanbemonitoredbyCloudEye.
Fordetailsonhowtoviewthemetrics,seeViewingDCSMonitoringMetrics.
OntheCloudEyeconsole,findtheConnectedClientsmetric.
Clicktoviewmonitoringdetailsonanenlargedgraph.
Specifyatimerangetoviewthemetricinaspecificmonitoringperiod.
Forexample,youcanselecta10-minuteperiodtoviewthenumberofconnectionsreceivedduringtheperiod.
Onthegraph,youcanviewthetrendandthetotalnumberofconnectionsreceivedduringtheperiod.
OntheCloudEyeconsole,youcanalsoviewothermonitoringmetricsofyourDCSinstances,forexample:CPUUsageMemoryUsageUsedMemoryOpsperSecond8.
2DoesRedisSupportCommandAuditsNo.
Toensurehigh-performancereadsandwrites,Redisdoesnotauditcommands.
Commandsarenotprinted.
8.
3WhatShouldIDoIftheMonitoringDataofaDCSRedisInstanceIsAbnormalIfyouhaveanydoubtonthemonitoringdataofaDCSRedisinstance,youcanaccesstheinstancethroughredis-cliandruntheINFOALLcommandtoviewtheDistributedCacheServiceFAQs8MonitoringandAlarm2020-03-1755metrics.
FordetailsabouttheoutputoftheINFOALLcommand,seehttp://www.
redis.
io/commands/info.
8.
4WhyIsUsedMemoryGreaterThanAvailableMemoryForsingle-nodeandmaster/standbyDCSinstances,theusedinstancememoryismeasuredbytheRedis-serverprocess.
ForclusterDCSinstances,theusedclustermemoryisthesumofusedmemoryofallshardsinthecluster.
Duetotheinternalimplementationoftheopen-sourceredis-server,theusedinstancememoryisnormallyslightlyhigherthantheavailableinstancememory.
Whyisused_memoryhigherthanmax_memoryRedisallocatesmemoryusingzmalloc.
Itdoesnotcheckwhetherused_memoryexceedsmax_memoryeverytimethememoryisallocated.
Instead,itcheckswhetherthecurrentused_memoryexceedsmax_memoryatthebeginningofaperiodictaskorcommandprocessing.
Ifused_memoryexceedsmax_memory,evictionistriggered.
Therefore,therestrictionsofthemax_memorypolicyarenotimplementedinrealtimeorrigidly.
Acaseinwhichtheused_memoryisgreaterthanthemax_memorymayoccuroccasionally.
8.
5WhyDoesBandwidthUsageExceed100%Thebasicinformationaboutthebandwidthusagemetricisasfollows.
MetricIDMetricNameDescriptionValueRangeMonitoredObjectandDimensionMonitoringPeriod(RawData)bandwidth_usageBandwidthUsagePercentageoftheusedbandwidthtothemaximumbandwidthlimit0–200%Monitoredobject:Master/standbyDCSRedis4.
0or5.
0instancesRedisServerofRedisClusterDCSRedis4.
0or5.
0instanceDimension:dcs_cluster_node1minuteBandwidthusage=(Inputflow+Outputflow)/(2xMaximumbandwidth)x100DistributedCacheServiceFAQs8MonitoringandAlarm2020-03-1756Accordingtotheformula,thebandwidthusagecountsintheinputflowandoutputflow,whichincludethetrafficforreplicationbetweenthemasterandreplicas.
Therefore,thetotaltrafficisgreaterthanthenormalservicetraffic.
IfthevalueoftheFlowControlTimesmetricislargerthan0,themaximumbandwidthhasbeenreachedandflowcontrolhasbeenperformed.
However,flowcontroldecisionsaremadewithoutconsideringthetrafficforreplicationbetweenthemasterandreplicas.
Therefore,sometimesthebandwidthusageexceeds100%butthenumberofflowcontroltimesis0.
8.
6WhyIstheRejectedConnectionsMetricDisplayedIftheRejectedConnectionsmetricisdisplayed,checkifthenumberofconnectedclientsexceedsthemaximumallowednumberofconnectionsoftheinstances.
Tocheckthemaximumallowednumberofconnections,gototheParameterstabpageoftheinstanceandcheckthevalueofthemaxclientsparameter.
DistributedCacheServiceFAQs8MonitoringandAlarm2020-03-17579Master/StandbySwitchover9.
1WhenDoesaMaster/StandbySwitchoverOccurAmaster/standbyswitchovermayoccurinthefollowingscenarios:Amaster/standbyswitchoveroperationisinitiatedontheDCSConsole.
Amaster/standbyswitchoverwillbetriggeredwhenthemasternodeofamaster/standbyinstancefails.
Forexample,ifcommands(suchasKEYS)thatconsumealotofresourcesareusedorlogsareagedanddeletedinbatches,theCPUusagewillsurge,triggeringamaster/standbyswitchover.
Ifyourestartamaster/standbyinstanceontheDCSconsole,amaster/standbyswitchoverwillbetriggered.
Afteramaster/standbyswitchoveroccurs,youwillreceiveanotification.
Checkwhethertheclientservicesarerunningproperly.
Ifnot,checkwhethertheTCPconnectionisnormalandwhetheritcanbere-establishedafterthemaster/standbyswitchovertorestoretheservices.
9.
2HowDoesMaster/StandbySwitchoverAffectServicesIfafaultoccursinamaster/standbyorclusterDCSinstance,afailoveristriggeredautomatically.
Servicesmaybeinterruptedforlessthanhalfaminuteduringexceptiondetectionandfailover.
9.
3DoestheClientNeedtoSwitchtheConnectionAddressAfteraMaster/StandbySwitchoverNo.
Ifthemasternodeisfailsoramaster/standbyswitchoverisperformed,thestandbynodewillbepromotedtomasterandtakestheoriginalIPaddress.
DistributedCacheServiceFAQs9Master/StandbySwitchover2020-03-17589.
4HowDoesRedisMaster/StandbyReplicationWorkRedismaster/standbyinstancesarealsocalledmaster/slaveinstances.
Generally,updatestothemastercachenodeareautomaticallyandasynchronouslyreplicatedtothestandbycachenode.
Thismeansthatdatainthestandbycachenodemaynotalwaysbeconsistentwithdatainthemastercachenode.
TheinconsistencyistypicallyseenwhentheI/Owritespeedofthemasternodeisfasterthanthesynchronizationspeedofthestandbynodeoranetworklatencyoccursbetweenthemasterandstandbynodes.
Ifafailoverhappenswhensomedataisnotyetreplicatedtothestandbynode,suchdatamaybelostafterthefailover.
DistributedCacheServiceFAQs9Master/StandbySwitchover2020-03-175910PurchasingandBilling10.
1WhyDoIFailtoCreateaDCSRedisorMemcachedInstanceThesubnetdoesnothavesufficientIPaddresses.
Analysis:EachnodeinaDCSinstancemustbeassignedanIPaddress.
Therefore,asingle-nodeinstancerequiresoneIPaddress,amaster/standbyinstancerequirestwoIPaddresses,andaclusterinstancerequiresmultipleIPaddresses.
Solution:CreatetheinstanceinadifferentsubnetwithintheVPCorreleaseIPaddressesinthecurrentsubnet.
Theresourcesaresoldout.
Analysis:Theunderlyingserverresourcesmightbeinsufficienttofulfillinstancecreationorderssubmittedbymultipleusersatthesametime.
Therefore,someusersmightfailtocreateinstances.
Solution:DeletetheinstancefailedtobecreatedandcreateanewoneinanotherAZ.
TheIAMuserdoesnothavethepermissionsrequiredtocreateaninstance.
Analysis:ThegrouptowhichtheuserbelongsmustbegrantedtheDCSFullAccesspolicyorDCSAdministratorroleorotherpoliciescontainingthepermissionsrequiredforcreatingDCSinstances.
Solution:CreateaDCSinstanceastheadministrator.
10.
2WhyCan'tIViewtheSubnetandSecurityGroupInformationWhenCreatingaDCSInstanceThismaybebecauseyoudonothavetheServerAdministratorandVPCAdministratorroles.
Fordetailsonhowtoadduserpermissions,seeModifyingUserGroupPermissions.
DistributedCacheServiceFAQs10PurchasingandBilling2020-03-176011MemcachedUsage11.
1CanIDumpDCSMemcachedInstanceDataforAnalysisNo.
11.
2WhatMemcachedVersionIsCompatiblewithDCSforMemcachedDCSforMemcachedisbasedonRedis3.
0andiscompatiblewithMemcached1.
5.
1.
11.
3WhatDataStructuresDoesDCSforMemcachedSupportOnlythekey-valuestructureissupported.
11.
4DoesDCSforMemcachedSupportPublicAccessNo.
TheECSthatservesasaclientandtheDCSinstancethattheclientwillaccessmustbelongtothesameVPC.
Intheapplicationdevelopmentanddebuggingphase,youcanalsouseanSSHagenttoaccessDCSinstancesinthelocalenvironment.
Fordetails,seeCanIAccessDCSInstancesinaLocalEnvironment11.
5CanIModifyConfigurationParametersofDCSMemcachedInstancesParameterconfigurationisallowedonlywhenDCSinstancesareintheRunningstate.
DistributedCacheServiceFAQs11MemcachedUsage2020-03-1761Fordetails,seeModifyingConfigurationParameters.
11.
6WhatAretheDifferencesBetweenDCSforMemcachedandSelf-HostedMemcachedTable11-1describesthedifferencesbetweenDCSforMemcachedandself-hostedMemcached.
Table11-1ComparingDCSforMemcachedandself-hostedMemcachedItemDCSforMemcachedSelf-HostedMemcachedDeploymentEasytodeploy.
DCSforMemcachedcanbeusedrightoutoftheboxwithoutrequiringyoutoworryaboutthehardwareorsoftware.
Involvescomplicatedoperationsandsettings.
AvailabilityMaster/Standbyinstancesusehotstandbytoensurestableservices.
Ifthemasternodeisfaulty,thestandbycachenodewillautomaticallybecomethemasternodetopreventasinglepointoffailure.
Requiresadditionalconfigurations.
SecurityUsestheVPCandsecuritygroupsfornetworkaccesssecuritycontrol.
Requiresyoutodesignandimplementasecuritymechanismbyyourself.
Scale-upSupportsonlinescale-upontheconsole.
Requiresadditionalhardwareandrestartingyourservice.
11.
7WhatPoliciesDoesDCSforMemcachedUsetoDealwithExpiredDataDCSforMemcachedallowsyoutosettheexpirationtimeforstoreddatabasedonservicerequirements.
Forexample,youcansettheexpiretimewhenperformingtheaddoperation.
Bydefault,dataisnotevictedfromDCSMemcachedinstances.
InthecurrentversionofDCSforMemcached,youcanselectanevictionpolicy.
DistributedCacheServiceFAQs11MemcachedUsage2020-03-1762Fordetailsaboutthesixtypesofdataevictionpolicies,seeWhatIstheDefaultDataEvictionPolicy11.
8HowShouldISelectAZsWhenCreatingaDCSMemcachedInstanceDifferentAZswithinaregiondonotdifferinfunctions.
Generally,instancedeploymentwithinanAZfeatureslowernetworklatencywhilecross-AZdeploymentensuresdisasterrecovery.
Ifyourapplicationrequireslowernetworklatency,choosesingle-AZdeployment.
DCSforMemcachedsupportscross-AZdeployment.
WhencreatingaDCSMemcachedinstanceontheDCSconsole,youcanselectanyAZinthesameregionasyourECSforcommunicationbetweenyourECSandinstance.
Forlowernetworklatency,selectthesameAZasyourECS.
AssumethatyouhaveanECSthatbelongstoAZBintheCNSouth-Guangzhouregion.
WhenpurchasingaDCSMemcachedinstance,youcanselectanyAZinCNSouth-Guangzhou.
IfyouselectAZBinCNSouth-Guangzhou,yourinstancecancommunicatewithyourECSwithlowernetworklatency.
NotethattheremaybeonlyoneavailableAZduetoinsufficientresourceswhenyoucreateaDCSMemcachedinstance.
ThisdoesnotaffectthenormaluseofDCS.
DistributedCacheServiceFAQs11MemcachedUsage2020-03-176312DCSPasswordComplexityRequirementsPasswordsforDCSinstancesmustmeetthefollowingrequirements:Cannotbeleftblank.
Cannotbetheusernameortheusernamespelledbackwards.
Mustbe8to32characterslong.
Containatleastthreeofthefollowingcharactertypes:–Lowercaseletters–Uppercaseletters–Digits–SpecialcharactersDistributedCacheServiceFAQs12DCSPasswordComplexityRequirements2020-03-1764

DiyVM独立服务器:香港沙田服务器,5M带宽CN2线路,L5630*2/16G内存/120G SSD硬盘,499元/月

diyvm怎么样?diyvm商家VPS主机均2GB内存起步,三个地区机房可选,使用优惠码后每月69元起;DiyVM独立服务器开设在香港沙田电信机房,CN2线路,5M带宽,自动化开通上架,最低499元/月,配置是L5630*2/16G内存/120G SSD硬盘。DiyVM是一家成立于2009年的国人主机商,提供的产品包括VPS主机、独立服务器租用等,产品数据中心包括中国香港、日本大阪和美国洛杉矶等,...

速云:深圳独立服务器,新品上线,深港mpls免费体验,多重活动!

速云怎么样?速云是一家国人商家。速云商家主要提供广州移动、深圳移动、广州茂名联通、香港HKT等VDS和独立服务器。目前,速云推出深圳独服优惠活动,机房为深圳移动机房,购买深圳服务器可享受5折优惠,目前独立服务器还支持申请免费试用,需要提交工单开通免费体验试用,次月可享受永久8折优惠,也是需工单申请哦!点击进入:速云官方网站地址活动期限至 2021年7月22日速云云服务器优惠活动:活动1:新购首月可...

iON Cloud七月促销适合稳定不折腾的用户,云服务器新购半年付8.5折,洛杉矶/圣何塞CN2 GT线路,可选Windows系统

iON Cloud怎么样?iON Cloud今天发布了7月份优惠,使用优惠码:VC4VF8RHFL,新购指定型号VPS半年付或以上可享八五折!iON的云服务器包括美国洛杉矶、美国圣何塞(包含了优化线路、CN2 GIA线路)、新加坡(CN2 GIA线路、PCCW线路、移动CMI线路)这几个机房或者线路可供选择,有Linux和Windows系统之分,整体来说针对中国的优化是非常明显的,机器稳定可靠,比...

127.0.0.1为你推荐
腾讯周鸿祎动设备管理解决iexplore.exe应用程序错误iexplore.exe - 应用程序错误怎么办阿??????itunes备份itunes 里面的资料如何备份?win7还原系统windows7怎么还原系统啊bitchina《绝对计划》蓝野明写的 我们的曲子 谁有啊?录音也行呵 谢谢啦!~~chrome172017款领航员四驱长轴3.5T车身长宽高马力油耗多大17款领航员报价ios11.0.2ios11.0.2 怎么降级微信5.0是哪一年的安卓什么时候能更新微信5.0版本?esetnod32idESET NOD32 ID/序列号
个人域名注册 smartvps 分销主机 电影服务器 omnis 68.168.16.150 轻博客 parseerror 毫秒英文 空间出租 工作站服务器 ntfs格式分区 135邮箱 服务器托管什么意思 国外视频网站有哪些 google台湾 512mb 什么是web服务器 php服务器 卡巴斯基试用版下载 更多