Wrote a quick post on some error handling with NATS micro https://lnkd.in/euTMPthb
John Hooks’ Post
More Relevant Posts
-
Re rendering, performance issues, use "UseCallBack". Many of us have came across these terms. Let's dive one step further in a beginner friendly way and explore the why behind UseCallBack and memoization . Suppose you have a component that has a function "Password Generator" that generates a unique password based on certain conditions set by user. You will only want to recreate/re-render the function if parameters for password change. Imagine a bad scenario : The user checks a box that causes your component to re render including the password Generator function. Re rendering uses compute power and we just wasted tiny bit of it to uselessly re render a function that was not required in this case (until the user wanted to generate a new password) . Tiny waste of compute power on a very large scale causes significant degradation in performance. Now what to do about it? Before I jump to memoization and useCallBack hook lets think what should happen: Ideally if there is no change in requirements for password that is user doesn't want to change it, the function password generator should not be recreated and rest of the component should be re rendered / updated as dependencies change. That is where use Callback and memoization comes in, they cache the most recent version of the function (and re use it) and only allows it to re render when it actually needs to (when requirements change) preventing unnecessary re renders. What if we don't care about it? Remember whenever a component reloads without any memoization functions are always recreated, worst case if any function is passed as a prop to any other child component, the child component will also re render completely thinking it is an updated version of the function (since reference changes). I know it is a little bit long read but I have tried my best to make it worth the extra minutes. For any confusions feel free to ask 🚀 Note: In below code The function is only recreated if its dependencies change.
To view or add a comment, sign in
-
-
Warp 10 3.1.2 comes with BigDecimal support. Learn how to use these new functions!
Introducing BigDecimal within WarpScript
https://blog.senx.io
To view or add a comment, sign in
-
Computer Engineer | Engineering of Network System support. | CISA®, CISM®, AZURE®, CCNA® #cisco, #servers, #support, #azure, #security
Top 6 Load Balancing Algorithms. 🔹 Static Algorithms 1. Round robin The client requests are sent to different service instances in sequential order. The services are usually required to be stateless. 2. Sticky round-robin This is an improvement of the round-robin algorithm. If Alice’s first request goes to service A, the following requests go to service A as well. 3. Weighted round-robin The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. 4. Hash This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. 🔹 Dynamic Algorithms 5. Least connections A new request is sent to the service instance with the least concurrent connections. 6. Least response time A new request is sent to the service instance with the fastest response time.
To view or add a comment, sign in
-
-
Top 6 Load Balancing Algorithms. 🔹 Static Algorithms 1. Round robin The client requests are sent to different service instances in sequential order. The services are usually required to be stateless. 2. Sticky round-robin This is an improvement of the round-robin algorithm. If Alice’s first request goes to service A, the following requests go to service A as well. 3. Weighted round-robin The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. 4. Hash This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. 🔹 Dynamic Algorithms 5. Least connections A new request is sent to the service instance with the least concurrent connections. 6. Least response time A new request is sent to the service instance with the fastest response time.
To view or add a comment, sign in
-
-
Head of IT-Department Performance Center | Expertise in IT Solutions and Network Design | Linux System Administrator | RHCSA | RHCE |
Top 6 Load Balancing Algorithms. 🔹 Static Algorithms 1. Round robin The client requests are sent to different service instances in sequential order. The services are usually required to be stateless. 2. Sticky round-robin This is an improvement of the round-robin algorithm. If Alice’s first request goes to service A, the following requests go to service A as well. 3. Weighted round-robin The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. 4. Hash This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. 🔹 Dynamic Algorithms 5. Least connections A new request is sent to the service instance with the least concurrent connections. 6. Least response time A new request is sent to the service instance with the fastest response time.
To view or add a comment, sign in
-
-
From Idea to MVP in Just 4 Weeks | Full-Stack Mobile App Developer | Delivering Scalable Solutions for Enhanced User Experiences.
Top 6 Load Balancing Algorithms. 🔹 Static Algorithms 1. Round robin The client requests are sent to different service instances in sequential order. The services are usually required to be stateless. 2. Sticky round-robin This is an improvement of the round-robin algorithm. If Alice’s first request goes to service A, the following requests go to service A as well. 3. Weighted round-robin The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. 4. Hash This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. 🔹 Dynamic Algorithms 5. Least connections A new request is sent to the service instance with the least concurrent connections. 6. Least response time A new request is sent to the service instance with the fastest response time.
To view or add a comment, sign in
-
-
Senior Project Manager|Infosys|B.E(Hons) BITS, Pilani & PGD in ML & AI at IIITB & Master of Science in ML & AI at LJMU, UK | (Building AI for World & Create AICX)(Learn, Unlearn, Relearn)
Top 6 Load Balancing Algorithms. 🔹 Static Algorithms 1. Round robin The client requests are sent to different service instances in sequential order. The services are usually required to be stateless. 2. Sticky round-robin This is an improvement of the round-robin algorithm. If Alice’s first request goes to service A, the following requests go to service A as well. 3. Weighted round-robin The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. 4. Hash This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. 🔹 Dynamic Algorithms 5. Least connections A new request is sent to the service instance with the least concurrent connections. 6. Least response time A new request is sent to the service instance with the fastest response time.
To view or add a comment, sign in
-
-
Head Of Technical, Cloud Service at UPSTRA | Sheba Group | Cloud Expert | GCP | GWS | Securty | Cloud Architech | DevSecOps| AWS | AZURE | Teach Team lead | CIO | CTO | Technology and Innovation |
Top 6 Load Balancing Algorithms. 🔹 Static Algorithms 1. Round robin The client requests are sent to different service instances in sequential order. The services are usually required to be stateless. 2. Sticky round-robin This is an improvement of the round-robin algorithm. If Alice’s first request goes to service A, the following requests go to service A as well. 3. Weighted round-robin The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. 4. Hash This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. 🔹 Dynamic Algorithms 5. Least connections A new request is sent to the service instance with the least concurrent connections. 6. Least response time A new request is sent to the service instance with the fastest response time.
To view or add a comment, sign in
-
-
requests go to service A as well. 3. Weighted round-robin The admin can specify the weight for each service. The ones with a higher weight handle more requests than others. 4. Hash This algorithm applies a hash function on the incoming requests’ IP or URL. The requests are routed to relevant instances based on the hash function result. 🔹 Dynamic Algorithms 5. Least connections A new request is sent to the service instance with the least concurrent connections. 6. Least response time A new request is sent to the service instance with the fastest response time.
To view or add a comment, sign in
-
-
Want to know what makes Go 1.22 special? 🎉 While it was released a few months ago, Go 1.22 packs a punch with improvements for performance, tooling, and the standard library. Here are some of the highlights: ✨ Loop variable gotcha fixed! 🐛 No more accidental sharing bugs thanks to the new way loop variables are handled. Iterate over integers with for loops! 🔢 This long-awaited feature makes working with slices and arrays even more convenient. Enhanced routing patterns! 🌐 Define more expressive patterns for your HTTP routes with method support and wildcards. Turbocharged performance! ⚡️ The runtime improvements can give your Go programs a CPU performance boost of 1-3%. Math/rand gets a revamp! 🎲 Say hello to math/rand/v2 with a cleaner API, faster algorithms, and better randomness. Intrigued? There's more to discover! https://lnkd.in/dxA_2nU9 #GoLang #BackendDevelopment #Performance #Update #NewFeatures
Go 1.22 Release Notes
tip.golang.org
To view or add a comment, sign in