Knowledgebase

 
 
Knowledgebase Article
Knowledgebase > Unified Communications > SmartNode > SmartMedia > SN10K


SmartMedia - Load Balancing in Routing Script
Article Id #: 421

This article covers addition of Priority and Load sharing to any routing script. Idea behind the script is to regroup routes of the same kind, distribute load among them and prioritize one group versus another. Alternatively you can do the same on NAPs. You will use two additional parameters in the routes: group and weight.

group serves as two purpose:

  1. priority: a lower value will have higher priority
  2. matching routes of the same group will load share according to the weight parameter

'group' values should range from 0 to 100

weight will load share calls among matching routes of the same group. Used values should range from 10 to 100.

Setting up Filter Scripts

Filter setup requires main script to be modified. Let's assume we are using simple_routing.rb as main script

First, go to the routing script section of the Web Portal

Gateway -> Routing scripts -> Example Scripts -> simple_routing.rb [Edit]

Three things need to be added. At the start of the script:

require 'nap_group_weight_load_balancer'

In the main class:

include NapGroupAndWeightLoadBalancer
after_filter :method => :filter_by_group_and_weight, :weight_by => :call_attempts


The final script will look like this:

require 'base_routing'
require 'nap_group_weight_load_balancer'

class SimpleRouting < BaseRouting
  include NapGroupAndWeightLoadBalancer
  
  route_match :call_field_name => :called
  route_match :call_field_name => :calling
  route_match :call_field_name => :nap
  route_match :method => :match_nap_availability
  route_remap :call_field_name => :called, :route_field_name => :remapped_called
  route_remap :call_field_name => :calling, :route_field_name => :remapped_calling
  route_remap :call_field_name => :nap, :route_field_name => :remapped_nap
  
  after_filter :method => :filter_by_group_and_weight, :weight_by => :call_attempts

end

Adding New Custom Variables 

You will need two custom columns to use this script. There is a default value creates and it can be changed in each route afterwards.

Gateway -> Routes -> Create New Route Column

Name: group
Type attributes: integer
Default: (must be left empty)

Gateway -> Routes -> Create New Route Column

Name: weight
Type attributes: integer
Default: (must be left empty)

User Rating
This answer was helpful This answer was not helpful (8770 vote(s)) 
User Comments  Add a Comment )

 
 
Products
Unified Communications
> VoIP Adapters
> Fax Adapters
> VoIP Gateways
> VoIP Routers
> VoIP IADs - Integrated Access Devices
> Enterprise Session Border Controllers
> Media Gateways
> SS7 Gateways
> Secure End Points (SIP Phones)
> VoIP Public Address & Mass Notification
Software and Cloud
> Virtual SBC | Virtualized SBC
> Virtual Access Router
> VPN Server
> IPv6 IPv4 Converter
> Intelligent Edge Orchestration
> NFV & SDN
Networking & Access
> Ethernet Extenders
> Industrial Switches
> Industrial Ethernet
> Unmanaged Industrial Ethernet Switches
> Managed Industrial Ethernet Switches
> Industrial PoE Switches
> PoE Extenders
> Industrial Network Solutions
> xDSL Products | DSL Modems, DSL VoIP, DSL Router Modems
> Routers
> Dial-Up Access

Sunset Products
 
Datacom Industrial Connectivity
> Industrial PoE Products
> Ethernet Over Fiber
> Line Drivers / Short Range Modems
> Wireline Analog Modems
> Pro AV Live & Media Broadcast Systems
> Fiber Serial DataCom (RS-232/422/530/188C)
> Fiber Telecom (T1/E1/PRI, Analog & ISDN)
> Multiplexers & Sharing Devices
> SFP (Small Form Pluggable) Modules and Kits
> Fiber Alarming, Notification, Relay & Control
> Other Network Extenders
> Defense/Security Fiber Communications
> Baluns
> Surge Protectors & Opto-Isolators
> DataTaps, Testers, Adapters, Rack Kits
> Interface Converters
> Fiber Rack & Enclosure Systems
> Fiber Repeaters & Wavelength Division Multiplexers (WDM)
> Waveguide RF Filters
Media Transport
> Artel Racks & Chassis Infrastructure
> Video Over IP Transport
> Video Over Fiber Transport
> Video, Audio & Data Over Fiber Transport
> Video & Audio Over Fiber Transport
> Ethernet Over Fiber Transport
> Serial DataComm Over Fiber Transport
> Video, Fiber Testers & Splitters
> Wave Division Multiplexers
> Ethernet Switches
> SFP Modules and Kits
 
Sales: [email protected] / +1 301 975 1000
Support: [email protected] / +1 301 975 1007
Join Our Email List
Have Us Contact You
or
Login Connect With Us
X Linkedin Facebook Youtube
 
     Patton LLC Copyright © 2022 All Rights Reserved.

|  Sitemap  |   Legal  |   Privacy Policy  |   Disclaimer  |    X  Facebook  YouTube  LinkedIn  RSS