TWM597914U - Computer program product and apparatus for balancing loads in computer cluster - Google Patents
Computer program product and apparatus for balancing loads in computer cluster Download PDFInfo
- Publication number
- TWM597914U TWM597914U TW109203042U TW109203042U TWM597914U TW M597914 U TWM597914 U TW M597914U TW 109203042 U TW109203042 U TW 109203042U TW 109203042 U TW109203042 U TW 109203042U TW M597914 U TWM597914 U TW M597914U
- Authority
- TW
- Taiwan
- Prior art keywords
- token
- consumer node
- consumer
- node
- load balancer
- Prior art date
Links
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
Description
本新型關連於一種電腦叢集技術,特別是一種電腦叢集中平衡負載的電腦程式產品及裝置。 The present invention relates to a computer cluster technology, in particular to a computer program product and device that balances the load of the computer cluster.
電腦叢集是一組鬆散或緊密連接在一起工作的電腦,電腦叢集中的每個節點會被設定為執行相同的任務,由軟體控制和排程。因此,需要一種電腦叢集中平衡負載的電腦程式產品及裝置,用於優化整個系統的工作負載。 A computer cluster is a group of computers that work loosely or closely connected together. Each node in the computer cluster is set to perform the same task, controlled and scheduled by software. Therefore, there is a need for a computer program product and device that balances the load of a computer cluster to optimize the workload of the entire system.
有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。 In view of this, how to reduce or eliminate the deficiencies in the above-mentioned related fields is indeed a problem to be solved.
本說明書涉及一種電腦叢集中平衡負載的電腦程式產品,包含能夠被消費節點的處理單元載入並執行的程式碼:從負載平衡器接收到權杖後,請求任務伺服器執行服務;以及從任務伺服器獲得請求准許、執行成功或執行失敗的訊息後,歸還權杖給負載平衡器。 This manual relates to a computer program product for load balancing in a computer cluster, including code that can be loaded and executed by the processing unit of the consumer node: after receiving the token from the load balancer, request the task server to execute the service; and from the task The server returns the token to the load balancer after obtaining the request permission, execution success or execution failure message.
本說明書另涉及一種電腦叢集中平衡負載的電腦程式產品,包含能夠被負載平衡器的處理單元載入並執行的程式碼:從第一消費節點接收到權杖;依據電腦叢集中的多個消費節點的狀態來從消費節點中決定目的地消費節點;以及傳送權杖給目的地消費節點,從而使得目的地 消費節點具有請求任務伺服器執行服務的權利。 This manual also relates to a computer program product for load balancing in a computer cluster, including code that can be loaded and executed by the processing unit of the load balancer: the token is received from the first consumer node; according to multiple consumption in the computer cluster The state of the node determines the destination consumer node from the consumer node; and transmits the token to the destination consumer node, so that the destination The consumer node has the right to request the task server to execute the service.
本說明書更另涉及一種電腦叢集中平衡負載的裝置,包含通訊介面和處理單元。處理單元通過通訊介面從負載平衡器接收到權杖後,通過通訊介面請求任務伺服器執行服務;以及通過通訊介面從任務伺服器獲得請求准許、執行成功或執行失敗的訊息後,通過通訊介面歸還權杖給負載平衡器。 This specification also relates to a device for balancing load in a computer cluster, including a communication interface and a processing unit. After the processing unit receives the token from the load balancer through the communication interface, it requests the task server to execute the service through the communication interface; and after obtaining the request permission, execution success or execution failure message from the task server through the communication interface, it returns it through the communication interface The token is given to the load balancer.
本說明書更另涉及一種電腦叢集中平衡負載的裝置,包含通訊介面和處理單元。處理單元通過通訊介面從第一消費節點接收到一權杖;依據電腦叢集中的多個消費節點的狀態來從消費節點中決定目的地消費節點;以及通過通訊介面傳送權杖給目的地消費節點,從而使得目的地消費節點具有請求任務伺服器執行服務的權利。 This specification also relates to a device for balancing load in a computer cluster, including a communication interface and a processing unit. The processing unit receives a token from the first consumer node through the communication interface; determines the destination consumer node from the consumer nodes according to the states of multiple consumer nodes in the computer cluster; and transmits the token to the destination consumer node through the communication interface , So that the destination consumer node has the right to request the task server to perform the service.
上述實施例的優點之一,通過如上所述權杖的授予和歸還,避免消費節點向任務伺服器發出過多的請求,造成任務伺服器還需要耗費不必要的運算時間和資源來處理與回覆無法完成的請求。 One of the advantages of the above embodiment is that by granting and returning the token as described above, it prevents the consumer node from sending too many requests to the task server, causing the task server to consume unnecessary computing time and resources to process and reply. Completed request.
本新型的其他優點將搭配以下的說明和圖式進行更詳細的解說。 The other advantages of the present invention will be explained in more detail with the following description and drawings.
100:網路 100: Internet
110:電腦叢集 110: Computer Cluster
112,114,116:消費節點 112, 114, 116: consumer node
113,115,117:計時器 113, 115, 117: timer
130:任務伺服器 130: Task Server
20:網路系統 20: Network system
200:網路 200: Internet
210:電腦叢集 210: Computer Cluster
212,214,216:消費節點 212,214,216: consumer node
220:負載平衡器 220: Load balancer
230:資料庫伺服器 230: database server
250:任務伺服器 250: Task Server
310:處理單元 310: Processing Unit
320:顯示單元 320: display unit
330:輸入裝置 330: input device
340:儲存裝置 340: storage device
350:記憶體 350: memory
360:通訊介面 360: Communication interface
512:權杖生成器 512: Scepter Generator
513:權杖紀錄表 513: Scepter Record Table
514:任務執行器 514: task executor
516:權杖驗證器 516: token validator
518:節點應答器 518: Node Transponder
522:任務分派器 522: Task Dispatcher
524:節點詢問器 524: Node Interrogator
526:節點狀態表 526: Node Status Table
532:資料庫管理系統 532: Database Management System
534:權杖資料庫 534: Scepter Database
536:工作資料庫 536: Work Database
S610~S650:方法步驟 S610~S650: method steps
S710~S760:方法步驟 S710~S760: method steps
S810~S870:方法步驟 S810~S870: method steps
圖1係依據一些實施方式的任務伺服器服務多個消費節點的示意圖。 FIG. 1 is a schematic diagram of a task server serving multiple consumer nodes according to some embodiments.
圖2係依據本新型實施例的網路系統架構圖。 Figure 2 is a diagram of the network system architecture according to an embodiment of the present invention.
圖3係依據本新型實施例的運算裝置的系統架構圖。 FIG. 3 is a system architecture diagram of a computing device according to an embodiment of the present invention.
圖4係依據本新型實施例的權杖授予及收回的示意圖。 Fig. 4 is a schematic diagram of the token grant and withdrawal according to the embodiment of the present invention.
圖5係依據本新型實施例的軟體架構示意圖。 FIG. 5 is a schematic diagram of the software architecture according to an embodiment of the present invention.
圖6係依據本新型實施例的權杖生成的方法流程圖。 Fig. 6 is a flowchart of a method for generating tokens according to an embodiment of the present invention.
圖7係依據本新型實施例的權杖授予的方法流程圖。 Fig. 7 is a flowchart of a method for granting tokens according to an embodiment of the present invention.
圖8係依據本新型實施例的任務執行的方法流程圖。 Fig. 8 is a flowchart of a task execution method according to an embodiment of the present invention.
以下說明為完成新型的較佳實現方式,其目的在於描述本新型的基本精神,但並不用以限定本新型。實際的新型內容必須參考之後的權利要求範圍。 The following description is a preferred implementation method for completing the new type, and its purpose is to describe the basic spirit of the new type, but not to limit the new type. The actual new content must refer to the following claims.
必須了解的是,使用於本說明書中的“包含”、“包括”等詞,用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。 It must be understood that the words "including" and "including" used in this specification are used to indicate the existence of specific technical features, values, method steps, operations, elements, and/or components, but they do not exclude the possibility of adding More technical features, values, method steps, job processing, components, components, or any combination of the above.
於權利要求中使用如“第一”、“第二”、“第三”等詞是用來修飾權利要求中的元件,並非用來表示之間具有優先順序,前置關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用來區別具有相同名字的元件。 Words such as "first", "second", and "third" used in the claims are used to modify the elements in the claims, and are not used to indicate that there is a precedence, prerequisite relationship, or an element Prior to another component, or the chronological order of execution of method steps, is only used to distinguish components with the same name.
為了讓任務伺服器可以同時服務一個電腦叢集中的多個消費節點,圖1係依據一些實施方式的任務伺服器服務多個消費節點的示意圖。在這些實施方式中,電腦叢集110中的消費節點112、114和116分別啟動一個計時器113、115和117,週期性地通過網路100向任務伺服器130提出請求,用於完成一個特定任務。如果任務伺服器130的能力無法服務消費節點112、114和116的請求,任務伺服器130會拒絕消費節點112、114和116的請求。然而,由於消費節點112、114和116是獨立向任務伺服器130提出請求,彼此間不知道其他消費節點的請求狀況,因此,可能會發出過多的請求給任務伺服器130,造成任務伺服器130還需要耗費不必要的運算時間和資源來處理與回覆無法完成的請求。
In order to allow the task server to simultaneously serve multiple consumer nodes in a computer cluster, FIG. 1 is a schematic diagram of a task server serving multiple consumer nodes according to some embodiments. In these embodiments, the
為了解決如上所述使用計時器機制來協同一個電腦叢集中多個消費節點向任務伺服器的請求所帶來的缺點,本新型實施例提出一種權杖(Token)獲取機制,讓消費節點在獲取權杖後才能向任務伺服器提出請求。圖2係依據本新型實施例的網路系統架構圖。網路系統20包含任務伺服器(Task Server)250,用於提供各式各樣的服務。例
如,可以提供檔案傳輸通訊協議(File Transfer Protocol,FTP)、超文本傳輸協定(Hypertext Transfer Protocol,HTTP)、超文本傳輸安全協定(Hypertext Transfer Protocol Secure,HTTPS Request)、電子郵件管理、應用程式管理的服務,或上述任意組合的服務。應用程式管理可部署到任務伺服器250而成為應用程式伺服器,包含各式各樣的業務邏輯,可涵蓋但不限於數位銀行管理、網路銀行、行動客服、企業內部流程管理、大數據存儲、大數據資料整合、大數據資料檢索等領域。網路系統20另包含由多部消費節點(Consumer Node)212、214和216組成的電腦叢集210,其中的每個消費節點被設定為執行相同的任務。網路系統10設置負載平衡器(Load Balancer)220和資料庫伺服器(Database Server)230,通過控制權杖來協同消費節點212、214和216發出的請求,避免消費節點212、214和216向任務伺服器250發出過多請求而讓任務伺服器250耗費不必要的時間和資源來回應,進而提升系統的效能。消費節點212、214和216、負載平衡器220、資料庫伺服器230、任務伺服器250之間可透過網路200彼此通訊,網路200可為網際網路(Internet)、有線區域網路(wired Local Area Network,LAN)、無線區域網路、點對點網路(Peer-to-Peer,P2P Network),或以上的任意組合。
In order to solve the above-mentioned shortcomings caused by using the timer mechanism to coordinate requests from multiple consumer nodes in a computer cluster to the task server, the embodiment of the present invention proposes a token acquisition mechanism to allow consumer nodes to acquire Only after the token can be requested to the task server. Figure 2 is a diagram of the network system architecture according to an embodiment of the present invention. The
圖3係依據本新型實施例的運算裝置的系統架構圖。此系統架構可實施於消費節點212、214和216、負載平衡器220、資料庫伺服器230、任務伺服器250中之任一者,至少包含處理單元310。處理單元310可使用多種方式實施,例如以專用硬體電路或通用硬體(例如,單一處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器),並且在執行程式碼或軟體時,提供之後所描述的功能。系統架構另包含記憶體350及儲存單元340,記憶體350儲存程式碼執行過程中需要的資料,例如,變數、資料表(Data Tables)等,儲存單元340儲存各式各樣的電子檔案,例如,網頁、文件、音訊檔、視訊
檔等。系統架構另包含通訊介面360,讓處理單元310可藉以跟其他電子裝置進行溝通。通訊介面360可以是無線電信通訊模組(Wireless Telecommunications Module)、區域網路(Local Area Network,LAN)通訊模組或無線區域網路通訊模組(WLAN)。無線電信通訊模組(Wireless Telecommunications Module)可包含支援2G、3G、4G或以上技術世代的任意組合的調變解調器(Modem)。輸入裝置330可包含鍵盤、滑鼠、觸控面板等。使用者可按壓鍵盤上的硬鍵來輸入字元,藉由操作滑鼠來控制鼠標,或者是在觸控面板製造手勢來控制執行中的應用程式。手勢可包含單擊、雙擊、單指拖曳、多指拖曳等,但不限定於此。系統架構可選擇性的包含顯示單元320,而顯示單元320可包含顯示面板(例如,薄膜液晶顯示面板、有機發光二極體面板或其他具顯示能力的面板),用以顯示輸入的字元、數字、符號、拖曳鼠標的移動軌跡、繪製的圖案或應用程式所提供的畫面,提供給使用者觀看。
FIG. 3 is a system architecture diagram of a computing device according to an embodiment of the present invention. This system architecture can be implemented in any of the
整體來說,消費節點212、214和216執行相同的任務,並且由負載平衡器220統一控制和排程而形成電腦叢集210。負載平衡器220依據消費節點212、214和216的負載,授予權杖給其中一個節點,並且只有收到權杖的消費節點才能夠請求任務伺服器250提供服務。當任務伺服器250正在處理或服務完成後,此解點會歸還權杖給負載平衡器220,讓負載平衡器220能夠再通知下一個消費節點可以開始請求服務。圖4係依據本新型實施例的權杖授予及收回的示意圖。整個的授予及收回可分為五個階段,舉例說明如下:
In general, the
階段I:負載平衡器220可通過網路200發出授予訊息給消費節點212,用於授予權杖。授予訊息中可包含權杖的通用唯一識別碼(Universally Unique Identifier,UUID)和此權杖的生成時間。
Phase I: The
階段II:消費節點212可通過網路200詢問資料庫伺服器230來確認授予的權杖是否為有效的權杖。如果是,消費節點212繼續階段III的處
理,否則,代表這不是正確的權杖授予,直接丟棄這個權杖。
Stage II: The
階段III:消費節點212可通過網路200廣播訊息給其他消費節點214和216,通知消費節點212正擁有有效權杖的資訊,包含權杖的UUID和生成時間。
Stage III: The
階段IV:消費節點212可通過網路200發出請求給任務伺服器250,用於執行特定的服務。當請求被准許時,消費節點212可通過網路200從任務伺服器250獲得准許訊息。當服務執行完畢,消費節點212可通過網路200從任務伺服器250獲得執行成功/失敗的訊息。
Stage IV: The
階段V:消費節點212通過網路200發出歸還訊息給負載平衡器220,用於歸還權杖。在這裡需要注意,所屬技術領域人員可依據系統的需求設計歸還權杖的時間點,例如收到准許訊息後或收到執行成功/失敗的訊息後,本新型並不因此侷限。
Stage V: The
圖5係依據本新型實施例的軟體架構示意圖。消費節點212、214和216中的每一個可包含軟體模組實施的權杖生成器512、任務執行器514、權杖驗證器516和節點應答器518。這些軟體模組512、514、516和518的程式碼可儲存在每個消費節點的儲存裝置340,並且在適當的時間點被消費節點的處理單元310載入並執行。每個消費節點的處理單元310在其記憶體350中維護權杖紀錄表513,用於記錄系統20中存在的有效權杖的資訊。負載平衡器220可包含軟體模組實施的任務分派器522和節點詢問器524,並且在適當的時間點被負載平衡器220的處理單元310載入並執行。負載平衡器220的處理單元310另外在其記憶體350中維護節點狀態表513,用於記錄每個節點的運行狀態。資料庫伺服器230可包含軟體模組實施的資料庫管理系統532,並且在適當的時間點被資料庫伺服器230的處理單元310載入並執行。資料庫伺服器230另外在其儲存裝置340中維護權杖資料庫534和工作資料庫536,用於讓消費節點212、214和216通過資料庫管理系統532進行存取。
FIG. 5 is a schematic diagram of the software architecture according to an embodiment of the present invention. Each of the
負載平衡器220的節點詢問器524被執行時會不斷地通過網路200向消
費節點212、214和216發出詢問,用於檢查消費節點212、214和216是否還活著(或指還正常運行),並且將詢問結果記錄到節點狀態表526。每個消費節點的節點應答器518被執行時會不斷偵測負載平衡器220發出的詢問,一旦偵測到詢問則回覆一個訊息,用以證明自己還活著。如果消費節點212、214和216中的任何一者失效或者被從系統20被移除,負載平衡器220在詢問逾時後會得不到失效或移除節點的回覆。範例的節點狀態表526如表1所示:
節點狀態表526中的每個記錄可儲存每個消費節點的代碼、最後詢問時間、是否活著、是否擁有權杖等資訊。表1顯示消費節點212、214和216還正常運行,但是消費節點218可能失效或被移除。此外,消費節點212正擁有權杖,換句話說,消費節點212正向任務伺服器250請求執行特定的服務。
Each record in the node status table 526 can store the code of each consuming node, the last query time, whether it is alive, whether it has a token, and other information. Table 1 shows that the
通常,在系統初始化時,會由消費節點212、214和216中的指定一個產生權杖,或者是,當消費節點212、214和216中的任一者判斷系統中的權杖消失時,主動生成一個新的權杖。例如,當消費節點212獲得權杖但是卻在歸還權杖前失效,此時,權杖會在系統中消失。任一消費節點的處理單元310可在權杖紀錄表513新增一或多筆記錄,用來指出最新偵測到權杖的資訊,包含權杖的UUID、生成時間等資訊。任一消費節點的處理單元310通過通訊介面360從其他消費節點收到廣播訊息後(相應於圖4中的階段III),會據以更新其記憶體350中的紀
錄。此外,任一消費節點的處理單元310通過通訊介面360從負載平衡器220收到權杖後(相應於圖4中的階段I),也會據以更新其記憶體350中的紀錄。消費節點212中的範例權杖紀錄表513如表2所示:
權杖紀錄表513中的每個記錄可儲存每次偵測到權杖的時間、訊息來源、目前擁有權杖的擁有者、權杖UUID和生成時間等資訊。表2顯示消費節點212於時間點”2020-2-25-17:00:20”從消費節點214收到其正擁有權杖(UUID為”123456789”,生成時間為”2020-2-25-15:44:20”)的資訊。表2另顯示消費節點212於時間點”2020-2-25-17:54:30”被負載平衡器220授予權杖(UUID為”123456789”,生成時間為”2020-2-25-15:44:20”)的資訊。
Each record in the token record table 513 can store information such as the time when the token is detected each time, the source of the message, the owner who currently owns the token, the token UUID, and the generation time. Table 2 shows that the
消費節點212、214和216中任一個的處理單元310(為了方便說明,以下簡稱處理單元310)載入並執行權杖生成器412的程式碼時完成圖6所示的權杖生成方法的流程圖,詳細說明如下:
When the
步驟S610:判斷權杖是否在系統20中消失。如果是,則進行步驟S630的處理;否則,進行步驟S620的處理。處理單元310可查詢記憶體350中的權杖紀錄表513來判斷紀錄中的最近偵測時間距現在的時間點是否超過預設的閥值,例如2分鐘,如果是,則判斷權杖在系統20中消失,需要生成一個新的權杖。
Step S610: Determine whether the token disappears in the
步驟S620:等待n秒,例如10<n<預設閥值。步驟S610和S620形成一個每n秒就執行一次的迴圈,用於不斷偵測權杖是否在系統20中消失。處理單元310可啟動一個計時器來計數n秒,並在計數完成時發出通知,用於進行步驟S610的判斷。
Step S620: Wait for n seconds, for example, 10<n<the preset threshold. Steps S610 and S620 form a loop that is executed every n seconds to continuously detect whether the token disappears in the
步驟S630:生成權杖,包含UUID。 Step S630: Generate a token, including UUID.
步驟S640:更新資料庫伺服器230中的權杖資料庫534,用於記錄新生成的權杖資訊。處理單元310可通過通訊介面360向資料庫管理系統532發出結構化查詢語言(Structured Query Language,SQL)指令,用於新增一筆記錄到權杖資料庫534,包含新權杖的UUID、生成時間等資訊。
Step S640: Update the
步驟S650:傳送新生成的權杖給負載平衡器220。處理單元310可通過通訊介面360傳送生成訊息給負載平衡器220,包含新權杖的UUID、生成時間等資訊。
Step S650: Transmit the newly generated token to the
負載平衡器220的處理單元310(為了方便說明,以下簡稱處理單元310)載入並執行任務分派器522的程式碼時完成圖7所示的權杖授予方法的流程圖,詳細說明如下:
When the
步驟S710:通過通訊介面260從消費節點接收到新生成或歸還的權杖,包含權杖的UUID和生成時間等資訊。關於歸還權杖,相應於圖4中的階段V。 Step S710: Receive the newly generated or returned token from the consumer node through the communication interface 260, including information such as the UUID of the token and the generation time. Regarding the return of the token, it corresponds to stage V in FIG. 4.
步驟S720:判斷權杖是否正在使用中。如果是,則繼續進行步驟S730的處理。否則,繼續進行步驟S740的處理。處理單元310可搜索節點狀態表526的內容來判定是否有消費節點正擁有權杖並正常運行中,如果是,則代表有權杖是否正在使用中。在某些情況下,任務伺服器250執行請求服務所需的時間可能很長而拉長歸還權杖的時間,然而,其他沒有擁有權杖的消費節點可能誤以為權杖從系統20中消失而生成新的權杖,造成兩個權杖同時存在的情形,引發不必要的錯誤。這個步驟的執行是為了避免如上所述的情況。
Step S720: Determine whether the token is in use. If yes, proceed to the processing of step S730. Otherwise, the process of step S740 is continued. The
步驟S730:刪除資料庫伺服器230中關於此權杖的資訊。處理單元310可通過通訊介面360向資料庫管理系統532發出SQL指令,用於從權杖資料庫534中刪除關於此權杖的記錄。
Step S730: Delete the information about the token in the
步驟S740:判斷此權杖是否為最新的權杖。如果是,則繼續進行步驟S750的處理。否則,繼續進行步驟S710的處理。處理單元310可通過
通訊介面360向資料庫管理系統532發出SQL指令,用於查詢權杖資料庫534中是否存在較此權杖更新的權杖的記錄。如果資料庫管理系統532回覆找不到任何記錄,則代表此權杖為最新的權杖。
Step S740: Determine whether this token is the latest token. If yes, proceed to the processing of step S750. Otherwise, the process of step S710 is continued. The
步驟S750:決定目的地消費節點。處理單元310可使用習知的排程演算法根據消費節點212、214和216的狀態(例如,過去執行任務的歷史紀錄,目前的工作處理量,或其他代表消費節點212、214和216工作負載的因素,或者是上述的任意組合)來從中決定出目的地消費節點。
Step S750: Determine the destination consumer node. The
步驟S760:發送權杖給目的地消費節點。處理單元310可通過通訊介面360發送授予訊息給目的地消費節點,包含此權杖的UUID和生成時間。關於權杖的發送,相應於圖4中的階段I。
Step S760: Send the token to the destination consumer node. The
消費節點212、214和216中任一個的處理單元310(為了方便說明,以下簡稱處理單元310)載入並執行任務執行器514的程式碼時完成圖8所示的任務執行方法的流程圖,詳細說明如下:
When the
步驟S810:從負載平衡器220接收到權杖。處理單元310可通過通訊介面360從負載平衡器220接收到授予訊息,包含權杖的UUID和生成時間。關於權杖的接收,相應於圖4中的階段I。
Step S810: Receive the token from the
步驟S820:判斷此權杖是否為有效的權杖。如果是,則繼續步驟S830的處理。否則,忽略此權杖,並繼續步驟S810的處理。處理單元310可通過通訊介面360向資料庫管理系統532發出SQL指令,用於查詢權杖資料庫534中是否存在較此權杖更新的權杖的記錄。如果資料庫管理系統532回覆找不到任何記錄,則代表此權杖為有效的權杖。這個步驟可實施於權杖驗證器516的程式碼,並通過調用權杖驗證器516的程式碼來完成。關於權杖驗證,相應於圖4中的階段II。
Step S820: Determine whether the token is a valid token. If yes, continue the processing of step S830. Otherwise, ignore this token and continue the processing of step S810. The
步驟S830:廣播訊息給其他消費節點,用於通知此消費節點正擁有有效權杖的資訊。關於訊息的廣播,相應於圖4中的階段III。 Step S830: Broadcast a message to other consuming nodes for notifying the consuming node that it has a valid token. Regarding the broadcast of the message, it corresponds to stage III in Figure 4.
步驟S840:從資料庫伺服器230取得欲執行的工作內容。處理單元310
可通過通訊介面360向資料庫管理系統532發出SQL指令,用於查詢工作資料庫536中記錄的工作內容。
Step S840: Obtain the job content to be executed from the
步驟S850:依據查詢到的工作內容,請求任務伺服器250執行特定服務。處理單元310可通過通訊介面360向任務伺服器250發出請求,包含相應於查詢到工作內容的參數。關於工作內容的查詢和服務的執行,相應於圖4中的階段IV。
Step S850: Request the
步驟S860:從任務伺服器250獲得請求准許,或執行成功/失敗的訊息。處理單元310可通過通訊介面360從任務伺服器250接收到請求准許,或執行成功/失敗的訊息。
Step S860: Obtain the permission request or the execution success/failure message from the
步驟S870:歸還權杖給負載平衡器220。處理單元310可通過通訊介面360發出歸還訊息給負載平衡器220,包含權杖的UUID和生成時間。關於請求准許或執行成功/失敗的訊息的接收和權杖的歸還,相應於圖4中的階段V。
Step S870: Return the token to the
本新型所述的方法中的全部或部分步驟可以電腦程式實現,例如電腦的作業系統、電腦中特定硬體的驅動程式、或軟體應用程式。此外,也可實現於如上所示的其他類型程式。所屬技術領域具有通常知識者可將本新型實施例的方法撰寫成電腦程式,為求簡潔不再加以描述。依據本新型實施例方法實施的電腦程式,可儲存於適當的電腦可讀取資料載具,例如DVD、CD-ROM、USB碟、硬碟,亦可置於可通過網路(例如,網際網路,或其他適當載具)存取的網路伺服器。 All or part of the steps in the method of the present invention can be implemented by computer programs, such as the operating system of the computer, the driver of a specific hardware in the computer, or a software application. In addition, it can also be implemented in other types of programs as shown above. Those with ordinary knowledge in the technical field can write the method of the embodiment of the present invention into a computer program, which will not be described for brevity. The computer program implemented according to the method of the embodiment of the present invention can be stored in a suitable computer readable data carrier, such as DVD, CD-ROM, USB disk, hard disk, and can also be placed on the Internet (for example, Internet Or other appropriate vehicle).
雖然圖3中包含了以上描述的元件,但不排除在不違反新型的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖6至圖8的步驟採用指定的順序來執行,但是在不違反新型精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本新型並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本新型亦不因此而侷限。 Although FIG. 3 includes the above-described components, it is not ruled out that without violating the spirit of the new style, more other additional components are used to achieve better technical effects. In addition, although the steps in Figures 6 to 8 are executed in the specified order, those skilled in the art can modify the order of these steps on the premise of achieving the same effect without violating the spirit of the new style. Therefore, this The new model is not limited to using only the sequence described above. In addition, those who are familiar with this skill can also integrate several steps into one step, or perform more steps in addition to these steps sequentially or in parallel, and the present invention is not limited by this.
雖然本新型使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本新型。相反地,此新型涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。 Although the present invention is described using the above embodiments, it should be noted that these descriptions are not intended to limit the present invention. On the contrary, this new model covers modifications and similar settings that are obvious to those skilled in the art. Therefore, the scope of applied claims must be interpreted in the broadest way to include all obvious modifications and similar settings.
20:網路系統 20: Network system
200:網路 200: Internet
210:電腦叢集 210: Computer Cluster
212,214,216:消費節點 212,214,216: consumer node
220:負載平衡器 220: Load balancer
230:資料庫伺服器 230: database server
250:任務伺服器 250: Task Server
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109203042U TWM597914U (en) | 2020-03-17 | 2020-03-17 | Computer program product and apparatus for balancing loads in computer cluster |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109203042U TWM597914U (en) | 2020-03-17 | 2020-03-17 | Computer program product and apparatus for balancing loads in computer cluster |
Publications (1)
Publication Number | Publication Date |
---|---|
TWM597914U true TWM597914U (en) | 2020-07-01 |
Family
ID=72602660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109203042U TWM597914U (en) | 2020-03-17 | 2020-03-17 | Computer program product and apparatus for balancing loads in computer cluster |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWM597914U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI744823B (en) * | 2020-03-17 | 2021-11-01 | 昕力資訊股份有限公司 | Computer program product and apparatus for balancing loads in computer cluster |
-
2020
- 2020-03-17 TW TW109203042U patent/TWM597914U/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI744823B (en) * | 2020-03-17 | 2021-11-01 | 昕力資訊股份有限公司 | Computer program product and apparatus for balancing loads in computer cluster |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11494380B2 (en) | Management of distributed computing framework components in a data fabric service system | |
US20220327125A1 (en) | Query scheduling based on a query-resource allocation and resource availability | |
US11580107B2 (en) | Bucket data distribution for exporting data to worker nodes | |
US11321321B2 (en) | Record expansion and reduction based on a processing task in a data intake and query system | |
US11442935B2 (en) | Determining a record generation estimate of a processing task | |
US10785322B2 (en) | Server side data cache system | |
US20190272271A1 (en) | Assigning processing tasks in a data intake and query system | |
US20190258637A1 (en) | Partitioning and reducing records at ingest of a worker node | |
US20190258635A1 (en) | Determining Records Generated by a Processing Task of a Query | |
US7937437B2 (en) | Method and apparatus for processing a request using proxy servers | |
US11068506B2 (en) | Selective dispatching of OLAP requests using execution statistics | |
US20120054280A1 (en) | Sharing Cloud Data Resources With Social Network Associates | |
US20090037367A1 (en) | System and Methodology Providing Workload Management in Database Cluster | |
US11086841B1 (en) | Streams on shared database objects | |
US11372667B2 (en) | Restoring the state of paused virtual machine environments with external attached volumes | |
US8463809B2 (en) | Method and computing system for distributed stream data processing using plural of computers | |
CN108228330A (en) | The multi-process method for scheduling task and device of a kind of serialization | |
US9672231B2 (en) | Concurrent access for hierarchical data storage | |
TWM597914U (en) | Computer program product and apparatus for balancing loads in computer cluster | |
US10320896B2 (en) | Intelligent mapping for an enterprise grid | |
TWI744823B (en) | Computer program product and apparatus for balancing loads in computer cluster | |
US11150939B2 (en) | Composite batching to manage throughput for online commerce applications | |
US20230153317A1 (en) | Method for scheduling offloading snippets based on large amount of dbms task computation | |
CN115630806A (en) | Task scheduling method and device, computer equipment and storage medium | |
TWM600871U (en) | Computer program product and apparatus for arranging and executing jobs |