-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff5ab17
commit 67311a4
Showing
5 changed files
with
113 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import Layout from "@/components/Layout"; | ||
import Button from "@/components/Common/button"; | ||
import Section from "@/components/Common/section"; | ||
import Alert from "@/components/Common/alert"; | ||
import Tabs from "@/components/Common/tab"; | ||
import Step from "@/components/Common/step"; | ||
import Card from "@/components/Common/card"; | ||
import Important from "@/components/Common/important"; | ||
import Highlight from "@/components/Common/highlight"; | ||
import Link from "next/link"; | ||
import NextPage from "@/components/Common/nextpage"; | ||
|
||
import Head from "next/head"; | ||
|
||
<Layout> | ||
<Head> | ||
<title>مستندات تنظیم تعداد workerهای Gunicorn در Flask - لیارا</title> | ||
</Head> | ||
# تنظیم تعداد workerهای Gunicorn در برنامههای Flask | ||
<hr className="mb-2" /> | ||
|
||
در <a href="https://gunicorn.org/" className="text-[#2196f3] ">Gunicorn</a>، یک worker فرآیندی است که مسئول پردازش درخواستها و پاسخها در یک برنامه وب است. worker میتواند به صورت مستقل از بقیه فرآیندها عمل کند و بار کاری بین آنها، به سادگی، تقسیم میشود. این کار باعث افزایش کارایی و مقیاسپذیری برنامه میشود. | ||
|
||
برای تنظیم تعداد Workerهای Gunicorn کافیست تا طبق مستندات <a href="/paas/details/envs" className="text-[#2196f3] ">تنظیم متغیرهای محیطی</a>، یک متغیر محیطی به نام <Important>GUNICORN_WORKERS</Important> | ||
با مقدار دلخواه که همان تعداد Workerها است، به برنامه اضافه کنید. | ||
|
||
|
||
<div className="h-2" /> | ||
<Alert variant="info"> | ||
<p> | ||
مقدار پیشفرض این متغیر در برنامههای Flask، برابر با 3 است. | ||
</p> | ||
</Alert> | ||
|
||
|
||
</Layout> |