DEV Community· Tung Nguyen·· 1 小時前AI 評分44
如何以私人編輯器在佇列模式下運行 n8n
Run n8n in queue mode with a private editor
AI 導讀
透過 Blossom,n8n 可在佇列模式下把編輯器與工作程序設為獨立服務,並以 Redis 傳遞執行工作、以 PostgreSQL 儲存工作流程、已儲存的憑證及執行記錄。主服務與工作程序須使用相同版本的 n8n 和 N8N_ENCRYPTION_KEY;增加工作程序可提升執行容量,但工作流程如會傳遞檔案,須先安排共用二進制儲存。
正文
n8n is a popular workflow automation tool. With Blossom, you can run the editor and workers as separate services. That’s the part I like. You can add workers without touching the editor.
We set it up in queue mode with a private editor.
- The main service handles the editor, triggers, and webhook entry points.- Workers pull execution jobs from Redis.- PostgreSQL holds workflows, saved credentials, and execution records.- The main process and workers use the same n8n release and the same N8N_ENCRYPTION_KEY. Keep that key stable across updates so replacement containers can use the saved credentials.Our first test was a published webhook that uses Header Auth and returns the request ID. We called it with and without the header to check both outcomes. Then we redeployed, repeated the calls, and ran the same test after increasing and reducing the worker count. If your workflows pass files around, work out shared binary storage before adding workers. Scaling the workers gives you more execution capacity. Editor and trigger redundancy has its own setup. Adapted from my BoltOps article. AI helped with the draft.
來源:DEV Community · dev.to