Queues...?
Hey,
I have a queue question which might be obvious but I can't seem to find an answer. Does Appistry automatically queue submitted jobs as to not overload the workers in the cloud?
A more of an example version of that is question, is say we have a cloud with 10 workers and we run a process that submits 1000 jobs to the cloud. Will Appistry try to submit all 1000 jobs so that all 10 workers have a 100 jobs? Or will Appistry only send 1 process to each of the 10 workers keeping the other 990 in a queue so that when one finishes it will start the next?
I know that there are FAM Queues, but I have a couple questions about that. Where is actually queue data stored, is it in memory? Or is written to a temp file somewhere? Will the FAM queues hold gigabytes of data?
Thanks
Ed
Hi Ed,
Each time a new request is submitted to the fabric, the workers themselves will volunteer if they have resources available. They will also have a "weight" associated with them to ensure proper load balancing between workers. That being said, transactions that do not have a volunteer will continue to wait for a volunteer until their timeouts are exceeded. This will ensure that the workers do not get overloaded by fabric transactions that they are not able to handle.
You have some options to how you submit your transactions. We give you many options so that you can decide what meets your needs. For example, your process (client) could submit all 1000 transactions asynchronously. This would mean that all of them will be submitted, and your process will not wait for responses before submitting the next transactions in the group of 1000. The fabric may be able to handle all 1000 at once, it may not. This depends on your workers' resources. If it cannot, some of those transactions will receive timeouts because the timeouts that you set have been exceeded. In that case, we suggest throttling to a certain amount of in-flight transactions. You could throttle your transactions to 10 in-flight transactions. Another option is synchronous, you can submit the transaction and block until it gets back. This is another way to throttle. Nevertheless, your workers will work on as many transactions that it can handle unless you specify otherwise.
The FAM stores everything in memory. It does not store it on a local temp file. I will be honest, I do not believe that we have tested a gigabyte of FAM data. However, the limitations of the FAM depend on your workers resources.
I hope this answers your questions,
Mark