It is possible to change the capacity of an entity server dynamically?

13 views (last 30 days)
It is possible to change the capacity of an entity server dynamically? For example if the utilization exceeds some threshold then an the capacity increases (in effect adding another server). If so, how can this be done? Is there documentation I could look at? The entity server documentation didn't seem to have any clues.
For context, I'm modeling a cloud type service, where new servers are started as needed. I'm using the SimEvents library as it has queues, but if there is a better way I'd be happy to hear it.
Thanks.

Accepted Answer

Mo Zhao
Mo Zhao on 13 Apr 2017
Edited: Mo Zhao on 13 Apr 2017
Hi Scott,
Entity server itself does not support dynamic capacity currently. However, this is doable using several blocks in combination. Consider introducing several spare servers connected in parallel with the initial server, each connected thru an Entity Gate, which is controlled by the statistics port(#n) of the entity server(s) via a Simulink Function. If the number of entities in block exceeds certain threshold, the statistics would trigger the gate to open and place an additional server in connection.
You can also do this logic with MATLAB Discrete-Event System, where instead of drawing connections, you can write code to schedule the forwarding and processing events of server and this can put additional storages in use.
You can have a look at the complex examples to see how to use Simulink Functions with statistic ports of SimEvents blocks, and how to use MATLAB Discrete-Event System.
Thanks,
Mo

More Answers (2)

Scott
Scott on 14 Apr 2017
Thanks. I went with the first approach since it's simpler to implement. The second approach is appealing since it is more flexible and I may try it later.
Thanks for the help!
Scott

SUHIB SULIMAN
SUHIB SULIMAN on 21 Apr 2022
shot_cnt=1000
rank_cnts=[{},{},{}]
for x in range(shot_cnt):
if (x%100)==0:
print(x)
a_i_range=[1,1.25]
b_i_range=[1,2]
c_i_range=[1,1.5]
"""##Import lib + read data from file"""
import pandas as pd
import numpy as np
import networkx as nx
#import matplotlib.pyplot as plt
df = pd.read_csv('data_files/swimdata.csv')

Categories

Find more on Discrete-Event Simulation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!