%3CLINGO-SUB%20id%3D%22lingo-sub-2022222%22%20slang%3D%22en-US%22%3EAzure%20Redis%20Timeouts%20-%20Network%20Issues%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2022222%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EOverview%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EThere%20are%20many%20reasons%20that%20may%20cause%20timeouts%20on%20Redis%20client%20side%2C%20due%20to%20client%2C%20network%20or%20server%20side%20causes%2C%20and%20the%20error%20message%20also%20may%20differ%20based%20on%20Client%20library%20used.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3ETimeouts%20in%20Azure%20Cache%20for%20Redis%20occurs%20on%20client%20side%20when%20client%20application%20cannot%20receive%20the%20response%20from%20Redis%20server%20side%20timely.%3CBR%20%2F%3EAnytime%2C%20when%20client%20application%20doesn%E2%80%99t%20receive%20response%20before%20one%20of%20the%20timeout%20values%20expire%2C%20a%20timeout%20will%20occur%20and%20will%20be%20logged%20on%20client%20application%20logs%20as%20Redis%20timeout%20error%20message.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EOn%20Network%2C%20Redis%20timeouts%20may%20occur%20anytime%20due%20to%20connection%20failure%2C%20network%20blips%2C%26nbsp%3Bnetwork%20failures%2C%20Client%20or%20Server%20Network%20bandwidth%20limit%20exceeded%2C%20or%20any%20other%20network%20issues%20may%20degrade%20Redis%20connectivity%20and%20may%20cause%20Redis%20timeouts%20on%20client%20side.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOrder%20by%20most%20common%20issues%2C%20below%20are%20the%20most%20common%20Network%20causes%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E1-%20Network%20blips%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E2-%20Client%26nbsp%3BNetwork%20bandwidth%20limit%20exceeded%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E3-%20Server%20Network%20bandwidth%20limit%20exceeded%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20Client%20or%20Server%20side%20Redis%20timeout%20causes%2C%20please%20see%20these%26nbsp%3B%3CFONT%20size%3D%223%22%3E%3CSPAN%3ETech%20Community%20articles%3A%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Fazure-redis-timeouts-client-side-issues%2Fba-p%2F2022203%22%20target%3D%22_blank%22%3EAzure%20Redis%20Timeouts%20-%20Client%20Side%20Issues%3C%2FA%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Fazure-redis-timeouts-server-side-issues%2Fba-p%2F2022202%22%20target%3D%22_blank%22%3EAzure%20Redis%20Timeouts%20-%20Server%20Side%20Issues%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EMicrosoft%20recommendation%3A%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EMicrosoft%20recommendation%20is%20to%20use%20Azure%20Cache%20for%20Redis%20in%20the%20same%20Azure%20region%20as%20Redis%20client%20application.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EThe%20main%20reason%20for%20that%20is%20to%20take%20advantage%20of%20the%20large%20bandwidth%20used%20in%20the%20network%20backbone%20on%20each%20Azure%20region%2C%20with%20low%20latency%2C%20avoiding%20to%20use%20public%20networks%20with%26nbsp%3Bsmaller%26nbsp%3Bbandwidth.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EAzure%20Network%20backbone%20have%20many%20different%20ways%20to%20making%20it%20resilient%20to%20any%20failure.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EIn%20each%20Azure%20region%2C%26nbsp%3Bany%20eventual%20failure%20on%20Network%20backbone%20would%20affect%20all%20Azure%20services%20and%20all%20Customers%2C%20and%20not%20only%20the%20Azure%20Cache%20for%20Redis%20connections.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EThis%20is%20the%20main%20reason%20to%20avoid%20using%20Azure%20Cache%20for%20Redis%20service%20in%20a%20different%20Azure%20region%20than%20client%20application.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%230072c6%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CFONT%20size%3D%224%22%20color%3D%22%23FFFFFF%22%3E%3CSTRONG%3E1-%20Network%20blips%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3ENetwork%20blips%20can%20be%20caused%20by%20Azure%20Load%20Balancer%20operations%2C%20failovers%20due%20to%20Redis%20or%20Host%20updates%2Fpatches%2C%20or%20some%20other%20reasons.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EBecause%20of%20the%20transient%20nature%20of%20the%20network%20blips%2C%26nbsp%3Bit's%20not%20always%20possible%20to%20identify%20the%20cause%20of%20that%20network%20blips%20on%20client%20side.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3ENetwork%20blips%20can%20be%20expected%20and%20Microsoft%20recommends%20to%20use%20some%20retry%20policy%20on%20client%20side%20application%20to%20deal%20with%20these%26nbsp%3Btransient%20network%20blips.%3CBR%20%2F%3EWith%20that%2C%20network%20blips%20should%20be%20recovered%20by%20client%20application%20with%20a%20retry%2C%20avoiding%20any%20end%20user%20experience%20downtime.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3CSPAN%3EStackExchange.Redis%20client%20library%20has%20a%20setting%20named%20%3CFONT%20size%3D%223%22%3EAbortConnect%20%3C%2FFONT%3E%3C%2FSPAN%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%3Ethat%20controls%20how%20it%20handles%20connectivity%20errors%20like%20this.%20The%20default%20value%20for%20this%20setting%20is%20%22True%22%2C%20meaning%20that%20it%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Ewill%20not%26nbsp%3B%3C%2FSTRONG%3E%3CSPAN%3Ereconnect%20automatically%20in%20some%20cases.%20Microsoft%20recommendation%26nbsp%3Bis%20to%20set%20AbortConnect%20to%20false%2C%20to%20let%20the%20ConnectionMultiplexer%20reconnect%20automatically.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%230072c6%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CFONT%20size%3D%224%22%20color%3D%22%23FFFFFF%22%3E%3CSTRONG%3E2-%20Client%26nbsp%3BNetwork%20bandwidth%20limit%20exceeded%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3ETo%20identify%20if%20the%20reason%20for%20Redis%20timeouts%20are%20Client%26nbsp%3BNetwork%20bandwidth%20limit%20exceeded%2C%20network%20usage%20on%20Client%20environment%20(AppService%2C%20VM%2C%20VMSS%2C%20AKS%2C%20etc)%20used%20by%20Redis%20Client%20application%20should%20be%20investigated%2C%20to%20see%20if%20is%20reaching%20any%20network%20interface%20limit%20or%20any%20network%20bandwidth%20limit%20(inbound%20or%20outbound).%20%3CBR%20%2F%3EKeep%20in%20mind%20that%20all%20applications%20in%20client%20side%20environment%20may%20have%20high%20network%20utilization%20and%20not%20only%20the%20Redis%20Client%20application%3B%20also%2C%20Redis%20timeouts%20can%20be%20caused%20not%20only%20by%20100%25%20network%20bandwidth%20utilization%2C%20but%20values%20reaching%20100%25%20can%20also%20cause%20higher%20network%20latency%20and%20Redis%20timeouts.%3CBR%20%2F%3ETo%20troubleshoot%20this%2C%20some%20network%20tools%20on%20client%20side%20may%20needed%2C%20depending%20of%20client%20environment%20(AppService%2C%20VM%2C%20VMSS%2C%20AKS%2C%20etc).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%230072c6%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CFONT%20size%3D%224%22%20color%3D%22%23FFFFFF%22%3E%3CSTRONG%3E3-%20Server%20Network%20bandwidth%20limit%20exceeded%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3ETo%20identify%20if%20the%20reason%20for%20Redis%20timeouts%20are%20caused%20by%20Server%20Network%20bandwidth%20limit%20exceeded%2C%20Azure%20portal%20have%20two%20important%20metrics%20on%20Redis%20service%20or%20Azure%20Monitor%20blades%3A%20Cache%20Read%20and%20Cache%20Write.%26nbsp%3BThese%20shows%20the%20amount%20of%20data%20read%2Fwritten%20from%2Fto%20the%20cache%20in%20Megabytes%20per%20second%20(MB%2Fs)%2C%20during%20any%20specified%20reporting%20interval%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-how-to-monitor%23available-metrics-and-reporting-intervals%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAvailable%20metrics%20and%20reporting%20intervals%3C%2FA%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%3ECache%20Read%20and%20Cache%20Write%20metrics%20are%20available%20to%20the%20Redis%20instance%20or%20per%20shard%2C%20in%20case%20of%20Redis%20clustered%20instances.%20On%20that%20case%20you%20may%20need%20to%20investigate%20each%20shard%20network%26nbsp%3Busage%20to%20be%20able%20to%20identify%20any%26nbsp%3BNetwork%20bandwidth%20limit%20exceeded%20specifically%26nbsp%3Bin%20some%20shard.%3CBR%20%2F%3EWith%20that%20metrics%2C%20you%20can%20compare%20with%20the%20Azure%20Redis%20cache%20Network%20performance%20for%20your%20Redis%20tier%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-planning-faq%23azure-cache-for-redis-performance%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Cache%20for%20Redis%20performance%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLuisFilipe_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LuisFilipe_1-1609332466843.png%22%20style%3D%22width%3A%20702px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F243478i9B6FC8E0E936E08D%2Fimage-dimensions%2F702x365%3Fv%3D1.0%22%20width%3D%22702%22%20height%3D%22365%22%20role%3D%22button%22%20title%3D%22LuisFilipe_1-1609332466843.png%22%20alt%3D%22LuisFilipe_1-1609332466843.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EAny%20other%20network%20causes%20for%20Redis%20network%20connectivity%20issues%20should%20be%20investigated%20on%20client%20side%20using%20some%20network%20trace%20to%20better%20understand%20where%20is%20the%20source%20of%20the%20problem.%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%3EA%20network%20packet%20trace%20from%20client%20side%20may%20help%20network%20team%20to%20identify%20the%20source%20of%20the%20problem.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EAlso%2C%20if%20needed%20specifically%20troubleshoot%20network%20connectivity%2C%20please%20see%20how%20to%26nbsp%3B%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Ftroubleshooting-azure-redis-connectivity-issues%2Fba-p%2F1450361%22%20target%3D%22_blank%22%3ETroubleshooting%20Azure%20Redis%20Connectivity%20Issues%3C%2FA%3E%3C%2FSTRONG%3E%26nbsp%3B(Tech%20Community%20article)%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3EConclusion%3A%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%20color%3D%22%23000000%22%3EDespite%20having%20different%20reasons%20to%20have%20Redis%20timeouts%20on%20connections%20to%20Azure%20Cache%20for%20Redis%2C%20some%20different%20causes%20on%20%3CSPAN%3EClient%2C%20Server%20side%20or%20Network%26nbsp%3B%3C%2FSPAN%3Ecan%20cause%20Redis%20timeouts.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20Client%20or%20Server%20side%20Redis%20timeout%20causes%2C%20please%20see%20these%26nbsp%3B%3CFONT%20size%3D%223%22%3E%3CSPAN%3ETech%20Community%20articles%3A%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Fazure-redis-timeouts-client-side-issues%2Fba-p%2F2022203%22%20target%3D%22_blank%22%3EAzure%20Redis%20Timeouts%20-%20Client%20Side%20Issues%3C%2FA%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Fazure-redis-timeouts-server-side-issues%2Fba-p%2F2022202%22%20target%3D%22_blank%22%3EAzure%20Redis%20Timeouts%20-%20Server%20Side%20Issues%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CSTRONG%3ERelated%20documentation%3A%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-troubleshoot-timeouts%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ETimeout%20issues%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fredis.io%2Ftopics%2Fclients%23tcp-keepalive%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ERedis%20Client%20handling%20-%20TCP%20keepalive%3C%2FA%3E%3C%2FP%3E%0A%3CP%20lang%3D%22pt%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-best-practices%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBest%20practices%20for%20Azure%20Cache%20for%20Redis%3C%2FA%3E%26nbsp%3B(general%20and%20client%20library%20specific)%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgist.github.com%2FJonCole%2F925630df72be1351b21440625ff2671f%23file-redis-bestpractices-stackexchange-redis-md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EStackExchange.Redis%20best%20practices%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-how-to-monitor%23available-metrics-and-reporting-intervals%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAvailable%20metrics%20and%20reporting%20intervals%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-cache-for-redis%2Fcache-planning-faq%23azure-cache-for-redis-performance%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Cache%20for%20Redis%20performance%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-paas-blog%2Ftroubleshooting-azure-redis-connectivity-issues%2Fba-p%2F1450361%22%20target%3D%22_blank%22%3ETroubleshooting%20Azure%20Redis%20Connectivity%20Issues%3C%2FA%3E%26nbsp%3B(Tech%20Community%20article)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20can%20be%20useful%20!!!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2022222%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Azure%20Redis%20Timeouts%20-%20Network%20Side%20Issues.png%22%20style%3D%22width%3A%20543px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F243469iB0195D053FC2541A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Azure%20Redis%20Timeouts%20-%20Network%20Side%20Issues.png%22%20alt%3D%22Azure%20Redis%20Timeouts%20-%20Network%20Side%20Issues.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2022222%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Cache%20for%20Redis%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Redis%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

 

Overview

There are many reasons that may cause timeouts on Redis client side, due to client, network or server side causes, and the error message also may differ based on Client library used. 

 

Timeouts in Azure Cache for Redis occurs on client side when client application cannot receive the response from Redis server side timely.
Anytime, when client application doesn’t receive response before one of the timeout values expire, a timeout will occur and will be logged on client application logs as Redis timeout error message.

 

On Network, Redis timeouts may occur anytime due to connection failure, network blips, network failures, Client or Server Network bandwidth limit exceeded, or any other network issues may degrade Redis connectivity and may cause Redis timeouts on client side.

 

Order by most common issues, below are the most common Network causes: 

1- Network blips

2- Client Network bandwidth limit exceeded

3- Server Network bandwidth limit exceeded

 

For Client or Server side Redis timeout causes, please see these Tech Community articles:

Azure Redis Timeouts - Client Side Issues
Azure Redis Timeouts - Server Side Issues

 

 

Microsoft recommendation:

Microsoft recommendation is to use Azure Cache for Redis in the same Azure region as Redis client application.

The main reason for that is to take advantage of the large bandwidth used in the network backbone on each Azure region, with low latency, avoiding to use public networks with smaller bandwidth.

Azure Network backbone have many different ways to making it resilient to any failure.

In each Azure region, any eventual failure on Network backbone would affect all Azure services and all Customers, and not only the Azure Cache for Redis connections.

This is the main reason to avoid using Azure Cache for Redis service in a different Azure region than client application.

 

 

1- Network blips

Network blips can be caused by Azure Load Balancer operations, failovers due to Redis or Host updates/patches, or some other reasons.

Because of the transient nature of the network blips, it's not always possible to identify the cause of that network blips on client side. 

Network blips can be expected and Microsoft recommends to use some retry policy on client side application to deal with these transient network blips.
With that, network blips should be recovered by client application with a retry, avoiding any end user experience downtime.


StackExchange.Redis client library has a setting named AbortConnect that controls how it handles connectivity errors like this. The default value for this setting is "True", meaning that it will not reconnect automatically in some cases. Microsoft recommendation is to set AbortConnect to false, to let the ConnectionMultiplexer reconnect automatically.

 

 

2- Client Network bandwidth limit exceeded

To identify if the reason for Redis timeouts are Client Network bandwidth limit exceeded, network usage on Client environment (AppService, VM, VMSS, AKS, etc) used by Redis Client application should be investigated, to see if is reaching any network interface limit or any network bandwidth limit (inbound or outbound).
Keep in mind that all applications in client side environment may have high network utilization and not only the Redis Client application; also, Redis timeouts can be caused not only by 100% network bandwidth utilization, but values reaching 100% can also cause higher network latency and Redis timeouts.
To troubleshoot this, some network tools on client side may needed, depending of client environment (AppService, VM, VMSS, AKS, etc).

 

 

3- Server Network bandwidth limit exceeded

To identify if the reason for Redis timeouts are caused by Server Network bandwidth limit exceeded, Azure portal have two important metrics on Redis service or Azure Monitor blades: Cache Read and Cache Write. These shows the amount of data read/written from/to the cache in Megabytes per second (MB/s), during any specified reporting interval: Available metrics and reporting intervals
Cache Read and Cache Write metrics are available to the Redis instance or per shard, in case of Redis clustered instances. On that case you may need to investigate each shard network usage to be able to identify any Network bandwidth limit exceeded specifically in some shard.
With that metrics, you can compare with the Azure Redis cache Network performance for your Redis tier: Azure Cache for Redis performance

 

LuisFilipe_1-1609332466843.png

 

Any other network causes for Redis network connectivity issues should be investigated on client side using some network trace to better understand where is the source of the problem.
A network packet trace from client side may help network team to identify the source of the problem.

 

Also, if needed specifically troubleshoot network connectivity, please see how to Troubleshooting Azure Redis Connectivity Issues (Tech Community article)

 

   

Conclusion:

Despite having different reasons to have Redis timeouts on connections to Azure Cache for Redis, some different causes on Client, Server side or Network can cause Redis timeouts.

 

For Client or Server side Redis timeout causes, please see these Tech Community articles:

Azure Redis Timeouts - Client Side Issues
Azure Redis Timeouts - Server Side Issues

   

 

Related documentation:

Timeout issues 
Redis Client handling - TCP keepalive

Best practices for Azure Cache for Redis (general and client library specific)

StackExchange.Redis best practices

 

Available metrics and reporting intervals

Azure Cache for Redis performance

 

Troubleshooting Azure Redis Connectivity Issues (Tech Community article)

 

I hope this can be useful !!!