5.0.0 • Published 1 month ago

onedionys-load-balancer-middleware v5.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

💾 Requirements

  • Web Browser - Can be used as an emulator to build applications. Example Chrome, Firefox, Safari & Opera.
  • Internet - Because many use CDN and to make it easier to find solutions to all problems.

🎯 How To Use

Example Syntax

const express = require('express');
const loadBalancerMiddleware = require('./src/loadBalancerMiddleware');

const app = express();

const servers = [
    { url: 'http://server1.com', weight: 1 },
    { url: 'http://server2.com', weight: 2 },
    // Add more servers as needed
];

app.use(loadBalancerMiddleware(servers));

// Add your routes and other middleware here

app.listen(3000, () => {
    console.log('Server is running on port 3000');
});

Explanation

  • This middleware implements a basic load balancing algorithm to distribute incoming requests among multiple servers. It takes an array of server objects, each containing the server URL and its weight. The middleware then routes requests to the servers based on their weights.

Return Value

  • The middleware function returns an Express middleware function that can be used in an Express application. This middleware should be placed early in the middleware stack to ensure that all requests are properly load balanced before reaching other middleware or route handlers.

📆 Release Date

  • v1.0.0 : 17 March 2024
  • v1.0.1 : 18 March 2024
  • v1.0.2 : 31 March 2024
  • v5.0.0 : 31 March 2024

🧑 Author

  • Facebook : Oned Ionys
  • Instagram : @onedionys
  • Twitter : @onedionys
  • LinkedIn : @onedionys

📝 License

  • Copyright © 2024 One Dionys
  • One Dionys - Load Balancer Middleware is an open source project licensed under the MIT license

☕️ Suppport & Donation

Love One Dionys - Load Balancer Middleware? Support this project by donating or sharing with others in need.

Made with ❤️ One Dionys

aefkaaa-teaalphonixapp_nodejsbabisidadiagnose-healthygassefalsgozillaankarahyper212jquerykontol-lodonlodashmafiozomontea-appnoteaproonedionys-ajax-wrapperonedionys-analytics-integrationonedionys-animal-bearonedionys-animal-catonedionys-animal-deeronedionys-animal-dogonedionys-animal-elephantonedionys-animal-foxonedionys-animal-giraffeonedionys-animal-gorillaonedionys-animal-hippopotamusonedionys-animal-kangarooonedionys-animal-koalaonedionys-animal-liononedionys-animal-monkeyonedionys-animal-pandaonedionys-animal-rabbitonedionys-animal-rhinocerosonedionys-animal-tigeronedionys-animal-wolfonedionys-animal-zebraonedionys-animation-libraryonedionys-api-rate-limiting-handleronedionys-authentication-tokens-managementonedionys-charting-library-integrationonedionys-client-side-routing-utilitiesonedionys-clipboard-manageronedionys-code-documentation-generatoronedionys-code-splitting-utilitiesonedionys-color-manipulationonedionys-content-delivery-network-integrationonedionys-content-security-policy-generatoronedionys-cookie-consent-manageronedionys-cookie-managementonedionys-cors-middlewareonedionys-csrf-protection-middlewareonedionys-css-class-manipulationonedionys-data-anonymization-toolsonedionys-data-encryption-utilitiesonedionys-data-formatting-helpersonedionys-data-storageonedionys-database-abstraction-layeronedionys-date-languangeonedionys-date-time-utilitiesonedionys-debounce-throttle-functionsonedionys-dom-manipulation-helpersonedionys-dom-mutation-observersonedionys-dom-traversal-utilitiesonedionys-drag-drop-componentsonedionys-email-template-builderonedionys-error-handling-utilitiesonedionys-error-reporting-service-integrationonedionys-event-emitteronedionys-event-handling-libraryonedionys-feature-toggle-utilitiesonedionys-file-upload-componentonedionys-form-handling-utilitiesonedionys-form-input-maskingonedionys-form-wizard-componentsonedionys-formatted-input-fieldsonedionys-gdpr-compliance-toolkitonedionys-http-clientonedionys-image-compression-toolsonedionys-image-cropping-toolonedionys-image-gallery-componentonedionys-image-loading-utilitiesonedionys-input-autocompleteonedionys-internationalization-i18n-supportonedionys-jwt-authentication-middlewareonedionys-lazy-loading-componentsonedionys-lazy-loading-imagesonedionys-localization-libraryonedionys-localization-manageronedionys-markdown-rendering-componentsonedionys-math-utilitiesonedionys-modal-dialog-componentonedionys-montea-magiconedionys-notification-systemonedionys-number-languangeonedionys-pagination-componentonedionys-pdf-generation-utilitiesonedionys-progress-bar-componentonedionys-progressive-web-app-utilitiesonedionys-promise-utilitiesonedionys-real-time-data-syncingonedionys-responsive-design-helpersonedionys-responsive-image-componentsonedionys-responsive-table-componentsonedionys-routing-libraryonedionys-scrape-twitteronedionys-scrolling-utilitiesonedionys-search-bar-componentonedionys-secure-password-generatoronedionys-seo-friendly-paginationonedionys-seo-optimization-helpersonedionys-shop-builderonedionys-social-media-meta-tags-generatoronedionys-social-sharing-utilitiesonedionys-state-managementonedionys-static-site-generatoronedionys-string-utilsonedionys-template-engineonedionys-text-parsing-utilitiesonedionys-timezone-conversion-utilitiesonedionys-ui-theme-switcheronedionys-user-authenticationonedionys-user-role-permission-managementonedionys-validation-libraryonedionys-web-accessibility-checkeronedionys-web-accessibility-helpersonedionys-web-font-loaderonedionys-web-performance-analyzeronedionys-web-push-notification-integrationonedionys-web-storage-abstractiononedionys-websocket-wrapperonly-learningreturndaoprojectxstea
airdropfamsonedionys-image-compression-toolsonedionys-image-cropping-toolonedionys-image-gallery-componentonedionys-image-loading-utilitiesonedionys-input-autocompleteonedionys-internationalization-i18n-supportonedionys-jwt-authentication-middlewareonedionys-lazy-loading-componentsonedionys-localization-manageronedionys-markdown-rendering-componentsonedionys-modal-dialog-componentonedionys-notification-systemonedionys-number-languangeonedionys-progress-bar-componentonedionys-progressive-web-app-utilitiesonedionys-promise-utilitiesonedionys-real-time-data-syncingonedionys-responsive-design-helpersonedionys-responsive-image-componentsonedionys-responsive-table-componentsonedionys-routing-libraryonedionys-scrolling-utilitiesonedionys-search-bar-componentonedionys-seo-friendly-paginationonedionys-seo-optimization-helpersonedionys-shop-builderonedionys-api-rate-limiting-handleronedionys-authentication-tokens-managementonedionys-charting-library-integrationonedionys-client-side-routing-utilitiesonedionys-code-documentation-generatoronedionys-code-splitting-utilitiesonedionys-content-delivery-network-integrationonedionys-content-security-policy-generatoronedionys-cookie-consent-manageronedionys-cors-middlewareonedionys-csrf-protection-middlewareonedionys-css-class-manipulationonedionys-data-anonymization-toolsonedionys-data-encryption-utilitiesonedionys-data-formatting-helpersonedionys-data-storageonedionys-database-abstraction-layeronedionys-date-languangeonedionys-debounce-throttle-functionsonedionys-dom-manipulation-helpersonedionys-dom-mutation-observersonedionys-dom-traversal-utilitiesonedionys-drag-drop-componentsonedionys-email-template-builderonedionys-error-handling-utilitiesonedionys-error-reporting-service-integrationonedionys-event-emitteronedionys-event-handling-libraryonedionys-social-media-meta-tags-generatoronedionys-static-site-generatoronedionys-template-engineonedionys-text-parsing-utilitiesonedionys-timezone-conversion-utilitiesonedionys-ui-theme-switcheronedionys-user-authenticationonedionys-user-role-permission-managementonedionys-validation-libraryonedionys-web-accessibility-checkeronedionys-web-accessibility-helpersonedionys-web-font-loaderonedionys-web-performance-analyzeronedionys-web-push-notification-integrationonedionys-web-storage-abstractiononedionys-websocket-wrapperonedionys-social-sharing-utilitiesonedionys-animal-foxonedionys-animal-giraffeonedionys-animal-gorillaonedionys-animal-hippopotamusonedionys-animal-kangarooonedionys-animal-koalaonedionys-animal-liononedionys-animal-monkeyonedionys-animal-pandaonedionys-animal-rabbitonedionys-animal-rhinocerosonedionys-animal-tigeronedionys-animal-wolfonedionys-animal-zebraonedionys-ajax-wrapperonedionys-analytics-integrationonedionys-animal-bearonedionys-animal-catonedionys-animal-deeronedionys-animal-dogonedionys-animal-elephantonedionys-feature-toggle-utilitiesonedionys-file-upload-componentonedionys-form-handling-utilitiesonedionys-form-input-maskingonedionys-form-wizard-componentsonedionys-formatted-input-fieldsonedionys-gdpr-compliance-toolkit
5.0.0

1 month ago

1.0.1

2 months ago

1.0.0

2 months ago