#Load balancer
Explore tagged Tumblr posts
Text
Load Balancing Web Sockets with K8s/Istio
When load balancing WebSockets in a Kubernetes (K8s) environment with Istio, there are several considerations to ensure persistent, low-latency connections. WebSockets require special handling because they are long-lived, bidirectional connections, which are different from standard HTTP request-response communication. Here’s a guide to implementing load balancing for WebSockets using Istio.
1. Enable WebSocket Support in Istio
By default, Istio supports WebSocket connections, but certain configurations may need tweaking. You should ensure that:
Destination rules and VirtualServices are configured appropriately to allow WebSocket traffic.
Example VirtualService Configuration.
Here, websocketUpgrade: true explicitly allows WebSocket traffic and ensures that Istio won’t downgrade the WebSocket connection to HTTP.
2. Session Affinity (Sticky Sessions)
In WebSocket applications, sticky sessions or session affinity is often necessary to keep long-running WebSocket connections tied to the same backend pod. Without session affinity, WebSocket connections can be terminated if the load balancer routes the traffic to a different pod.
Implementing Session Affinity in Istio.
Session affinity is typically achieved by setting the sessionAffinity field to ClientIP at the Kubernetes service level.
In Istio, you might also control affinity using headers. For example, Istio can route traffic based on headers by configuring a VirtualService to ensure connections stay on the same backend.
3. Load Balancing Strategy
Since WebSocket connections are long-lived, round-robin or random load balancing strategies can lead to unbalanced workloads across pods. To address this, you may consider using least connection or consistent hashing algorithms to ensure that existing connections are efficiently distributed.
Load Balancer Configuration in Istio.
Istio allows you to specify different load balancing strategies in the DestinationRule for your services. For WebSockets, the LEAST_CONN strategy may be more appropriate.
Alternatively, you could use consistent hashing for a more sticky routing based on connection properties like the user session ID.
This configuration ensures that connections with the same session ID go to the same pod.
4. Scaling Considerations
WebSocket applications can handle a large number of concurrent connections, so you’ll need to ensure that your Kubernetes cluster can scale appropriately.
Horizontal Pod Autoscaler (HPA): Use an HPA to automatically scale your pods based on metrics like CPU, memory, or custom metrics such as open WebSocket connections.
Istio Autoscaler: You may also scale Istio itself to handle the increased load on the control plane as WebSocket connections increase.
5. Connection Timeouts and Keep-Alive
Ensure that both your WebSocket clients and the Istio proxy (Envoy) are configured for long-lived connections. Some settings that need attention:
Timeouts: In VirtualService, make sure there are no aggressive timeout settings that would prematurely close WebSocket connections.
Keep-Alive Settings: You can also adjust the keep-alive settings at the Envoy level if necessary. Envoy, the proxy used by Istio, supports long-lived WebSocket connections out-of-the-box, but custom keep-alive policies can be configured.
6. Ingress Gateway Configuration
If you're using an Istio Ingress Gateway, ensure that it is configured to handle WebSocket traffic. The gateway should allow for WebSocket connections on the relevant port.
This configuration ensures that the Ingress Gateway can handle WebSocket upgrades and correctly route them to the backend service.
Summary of Key Steps
Enable WebSocket support in Istio’s VirtualService.
Use session affinity to tie WebSocket connections to the same backend pod.
Choose an appropriate load balancing strategy, such as least connection or consistent hashing.
Set timeouts and keep-alive policies to ensure long-lived WebSocket connections.
Configure the Ingress Gateway to handle WebSocket traffic.
By properly configuring Istio, Kubernetes, and your WebSocket service, you can efficiently load balance WebSocket connections in a microservices architecture.
#kubernetes#websockets#Load Balancing#devops#linux#coding#programming#Istio#virtualservices#Load Balancer#Kubernetes cluster#gateway#python#devlog#github#ansible
5 notes
·
View notes
Text
Load Balancer
Ever wonder how Facebook, Linkedin, Twitter and other web giants are handling such huge amounts of traffic? They don’t have just one server, but tens of thousands of them. In order to achieve this, web traffic needs to be distributed to these servers, and that is the role of a load-balancer.
Readme:
Load-balancing
Load-balancing algorithms
0 notes
Text
youtube
AWS | Episode 51 | Mastering AWS Application Load Balancer: Intro & Hands-On Tutorial
#youtube#awscloud#tumblr milestone#aws#aws training#aws course#load balancer#application load balancer
1 note
·
View note
Text
when I rant about cloudflare and the unintended centralization of the internet, here's why.

the services they provide are valuable, but organizationally centralized—of course they are geographically distributed and redundant against hardware failure, but a bad config or company policy change can cause huge problems across the internet that are both hard to diagnose and hard to mitigate. for end users who don't know what a global load balancer is, it looks like half the internet just...fell off.
90 notes
·
View notes
Text
Seeing people say that Melinoe would be the type to reject love or love interests but like. I can see her being more polygamous than Zagreus precisely cause she's so hard-working and organized. Do you know how much work it requires to balance possibly 4 or 5 love interests? All with their own needs, personalities, vices etc.? Zagreus "my room in squalor is fine" could never.
#Melinoe#Zagreus (hades)#hades 2#hades II#hades II spoilers#yes Zagreus “god of relationship counseling” would be able to connect to many partners emotionally#but balancing all their needs? idk idk boy needs to work on that#Mel on the other hand I think could shoulder the load#especially with the stepkids that would come from Arachne's and Eris's angles
224 notes
·
View notes
Text
I want everyone to know from the bottom of my heart that if a teacher assigns you group work it's because they've talked themselves into believing it's pedagogically sound to sit at their desk for twenty minutes
31 notes
·
View notes
Text
woe silly Mia (+ Sol) doodles be upon ye
Mia... i miss her..... i need to post her more........
#Aughhh words can't describe just how badly i wanna yap about this specimen of a bimbo and her relationship with Sol........#She and Sol are timeloop buddies and to describe it best have sort of a yin and yang dynamic (within the wormhole and in general#Mia becomes the yin to Sol's yang and Sol becomes the yang to Mia's yin) and they challenge their moral beliefs and approach on handling#themselves and try to find a balance between selflessness (Sol) and selfishness (Mia)#it's nearly 4 am and i didn't explain it well since theres more to it but STILL#also get a load of Mia with her hair down my babies girl#i was a teenage exocolonist#iwatex#exocolonist#my art#art#artists on tumblr#sol exocolonist#mia exocolonist#iwatex oc#oc#my oc#my original character#original character#oc art#doodles#shitpost#anyways im going to sleep now
20 notes
·
View notes
Text
Tony: here, hold this *hands Peter a wrench*
Peter: *now holding 17 different tools* I think I'm gonna drop it
Tony: You're fine
*loud clang and crash*
Peter: ...I dropped it
#Tony just started handing him tools#peter didnt complain even when he had 6 and they were balanced precariously#so tony decided to see how many peter could hold#it was only 16#but after more extensive research and testing#peter can hold 32 screwdrivers with no notice or preparation#7 wrenches on a separate occasion#and he can hold 26 hammers#peter still doesnt know why tony keeps handing him loads of stuff#he is utterly oblivious#there are also betting pools of how many tools he can carry#bucky has won all of them so far#he is freakishly good at guessing things#peter parker#tony stark#ironman#spiderman#marvel#marvel cinematic universe#incorrect mcu quotes#incorrect mcu#marvel incorrect quotes#incorrect quotes#mcu#incorrect peter parker#incorrect tony stark#irondad#irondad and spiderson#spiderson
410 notes
·
View notes
Text
hot take rlcraft sucks its not enjoyable at all
#man its challenging without a point if that makes sense#u can load up a new world and die 20 times before u get away from spawn .... not my kind of hell ty#feels like a lot of shit was just thrown in to be hard#not fun or balanced#its good for ppl to make 2000000 yt videos out of ig but not to play
115 notes
·
View notes
Text
Having an office job is like, 60% waiting for a report to load.
#you’ll wait ten minutes for a report in oracle to finally load just to tell you that you put the wrong info so you got an error#I’ve actually been trying to generate a trial balance since yesterday but it keeps taking so long that it times out
23 notes
·
View notes
Text
Now then, to the mask dress. I've already picked out most of the parts, but now it's a matter of choosing which side split to work with. The red dress would be the most accurate, although I'd have to smooth out the texture to remove the sparkle. Alternatively there's going with the super tall thigh split that's off to the side, but I remember being an even bigger nightmare to work with.
#sims 3#wips3cc#wip#I'm leaning towards the red hot dress just for accuracy#but let's be honest#my indecisive ass may just choose to do them both#because what's having a healthy creator load balance?
7 notes
·
View notes
Text
#best sneaker footwear drops releases november 2024 week 4 nike adidas where to buy#Adidas#We’re rolling into the final days of November with a full head of steam#and the world’s biggest sneaker brands have one more round of drops set for us before we switch the calendar to the year’s final month. Nik#adidas#PUMA and more have everything from high-heat hoop shoes and altered takes on classics locked and loaded for this week#but before we dive in let’s take a look back at what went down over the last seven days first.#Nike had a wild week across all verticals#with two tenured collaborators#Stash and Hiroshi Fujiwara#teasing forthcoming projects (Air Max 95/Air Force 1 and Air Zoom Spiridon#respectively). Kobe Bryant got a tribute on two different Air Force 1 colorways — the “Home” and a black pair — that are set to release nex#while Travis Scott’s Jordan Jumpman Jack “Bright Cactus” had its official images revealed and several Nike/Jordan Brand sneakers debuted in#Not to be outdone#adidas made plenty of noise of their own. Olympic gold medalist Noah Lyles debuted a new Bad Bunny collab#while Jerry Lorenzo’s next Fear of God Athletics basketball shoes surfaced and the brand showed off a Foam Runner-indebted silhouette calle#with New Balance’s 993 having multiple moments in the spotlight thanks to the likes of JJJJound and Aimé Leon Dore#while OTTO 958 showed off its latest ASICS collab and stylist Veneda Carter continued her collaborative relationship with Timberland.#Now that you’re up to speed#check out what shoes are dropping this upcoming week and be sure to hit up HBX to shop styles that are available now.#Sporty & Rich x adidas SL72 “Sweden Pack”#Release Date: November 26#Release Price: $120 USD#Where to Buy: adidas#Why You Should Cop:Sporty & Rich announced its new collaboration with adidas Originals on the SL72 “Sweden Pack” last week — and it’s inspi#it’s been reworked with a retro aesthetic that pays homage to the athletic footwear designs of the 70s. adidas and S&R have used a selectio#using the colors to nod to Sweden’s national colors. Customary Three Stripe branding is applied to the lateral sides of the shoes#while further branding is applied to the tongues and heel counters to round things off.#Nike Air Max Waffle “Triple Black”#Release Price: $140 USD
12 notes
·
View notes
Text
the new d20 trailer: escaping/surviving in the forest, ink and parchment aesthetic, all sorts of woodland creatures and you are one of them, is (probably) going to pull the genre-expectations rug out from under you as soon as it has a chance
me
#look stoats make me think of 2 things#1 my pottermore patronus quiz result a bajillion years ago was a stoat (an animal i did not know of at the time)#2 inscryption#also i mix up stoats and mongooses and then think of taz balance#d20#dimension 20#burrow's end#original post#they are so cute too#its like weasels & ferrets w/out the loaded language and emotional baggage#inscryption
89 notes
·
View notes
Text
i think in the past few weeks i finally overcame the long slow soul curshing burnout i fell into after writing my last two books and breaking up with a partner of over 10 years. lately i have been feeling ENERGIZED and excited by future projects rather than bitter and resentful about needing to do anything, and im more tolerant of stimulation rather than being so extremely stress averse that i cancel anything that requires much energy. my energy is feeding into itself now. perfect time to fuck it all up by writing another book.
#im joking because it is the IDEA behind this new book that in part has me so energized#and the plan for it is far more actionable and simple than my last two books which were Ordeals to write tho worthy ones#im also giving myself a six month timeline to write it tho books only take me three typically#and im gonna load my weekends with lots of fun things and socializing and some of my week nights too so as to keep things in balance#WISH ME LUCK!!!!!!!!
70 notes
·
View notes
Text
Now Tesoro is trans it complicates the hypothetical dynamics diagram* even more bc after she comes out her biggest haters [mainly Cherry] are like good for you! aw damn it now i kinda like you. But also Cherry is annoyed because she can never have her hair undyed bc otherwise the main difference between them is one tattoo, Tesoros freckles and Cherrys eyes being green.
*i forgive her for it bc its never fucking happening anyway
#Cherry & Dina before Tesoro came out: i can [mostly] forgive you for all of the crimes you do but i cant forgive you being a man#muro & co#oc: tesoro#oc: cherry#Wheres the post about modern sinefeid where one of them transitions and another gifts her her old dress that she didnt like and the other#woman gets loads of compliments on the dress and now the one who gave the dress is seething but cant say shit#peak Tesoro & Cherry dynamic post transition#also that meme about coming out and then coming back a year later looking exactly like who you came out to#They still bicker but a lot of the tension and barbs are removed. they are buddies. never let them hear u say that tho#also so many jokes about Muro & Tesoro balancing each other out
4 notes
·
View notes