You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: change-log.html
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,8 @@ <h2>2014</h2>
83
83
Merged several pull requests (see closed
84
84
<aclass="reference external" href="https://github.com/makaimc/fullstackpython.github.com/pulls">GitHub repo pull requests</a>). New resources for platform-as-a-service section. Adding new
85
85
sections specified by the community as missing. Reorganized ordering of
86
-
content. Broke out subsections for Django and Flask.</p>
86
+
content. Broke out subsections for Django and Flask. Added signficant
87
+
content to the WSGI section.</p>
87
88
<p>Jan: Adding configuration management, application dependencies, and source
88
89
control sections. Also updating about section. Updated design to be fully
Copy file name to clipboardExpand all lines: source/content/pages/change-log.rst
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@ Added task queues section due to reader feedback. Rewrote intro section.
14
14
Merged several pull requests (see closed
15
15
`GitHub repo pull requests <https://github.com/makaimc/fullstackpython.github.com/pulls>`_). New resources for platform-as-a-service section. Adding new
16
16
sections specified by the community as missing. Reorganized ordering of
17
-
content. Broke out subsections for Django and Flask.
17
+
content. Broke out subsections for Django and Flask. Added signficant
18
+
content to the WSGI section.
18
19
19
20
Jan: Adding configuration management, application dependencies, and source
20
21
control sections. Also updating about section. Updated design to be fully
Copy file name to clipboardExpand all lines: wsgi-servers.html
+19-26Lines changed: 19 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -142,36 +142,29 @@ <h1>WSGI Servers</h1>
142
142
<p>However, knowing the WSGI standard and how these frameworks and containers
143
143
implement WSGI should be on your learning checklist though as you become
144
144
a more experienced Python web developer.</p>
145
-
<divclass="section" id="why-wsgi">
146
-
<h2>Why WSGI?</h2>
147
-
<p>Understanding the purpose of WSGI, and WSGI servers, is just as important as
148
-
understanding their implementation. Why not just point a web server directly at
149
-
your application?
150
-
There are a couple of reasons:</p>
145
+
<divclass="section" id="wsgi-s-purpose">
146
+
<h2>WSGI's Purpose</h2>
147
+
<p>Why use WSGI and not just point a web server directly at an application?</p>
151
148
<ul>
152
-
<li><pclass="first"><strong>WSGI gives you flexibility.</strong> Because the WSGI standard has been adopted
153
-
by all Python application frameworks and many web servers, it is trivial for
154
-
an application developer to swap out components of their stack for others.
155
-
Switching web servers, WSGI servers and even frameworks becomes easy, because
156
-
the configuration pattern is the same regardless of whether you are using
157
-
NGINX, Gunicorn and Django or Apache, mod_wsgi and Flask. From <aclass="reference external" href="http://www.python.org/dev/peps/pep-3333/">PEP 3333</a>:</p>
149
+
<li><pclass="first"><strong>WSGI gives you flexibility</strong>. Application developers can swap out
150
+
web stack components for others. For example, a developer can switch from
151
+
Green Unicorn to uWSGI without modifying the application or framework
152
+
that implements WSGI.
153
+
From <aclass="reference external" href="http://www.python.org/dev/peps/pep-3333/">PEP 3333</a>:</p>
158
154
<blockquote>
159
-
<p>The availability and widespread use of such an API in web servers for Python
160
-
[...] would separate choice of framework from choice of web server, freeing
161
-
users to choose a pairing that suits them, while freeing framework and
162
-
server developers to focus on their preferred area of specialization.</p>
155
+
<p>The availability and widespread use of such an API in web servers for
156
+
Python [...] would separate choice of framework from choice of web
157
+
server, freeing users to choose a pairing that suits them, while
158
+
freeing framework and server developers to focus on their preferred
159
+
area of specialization.</p>
163
160
</blockquote>
164
161
</li>
165
-
<li><pclass="first"><strong>WSGI servers promote scaling.</strong> If you want to serve thousands of requests
166
-
for dynamic content at once, relying on your application framework to smoothly
167
-
handle the traffic is a bad idea. Most app frameworks don't focus on serving
168
-
lots of concurrent requests gracefully. Rather, that job is left up to the WSGI
169
-
server. It will handle processing requests from the web server and deciding
170
-
how to communicate them to your application framework's process.</p>
171
-
<p>TODO: go into more detail about this</p>
172
-
<p>WSGI servers are designed with scaling in mind, and therefore their infrastructure
173
-
is better suited to handling high traffic volume than directly exposing your
174
-
application to the web.</p>
162
+
<li><pclass="first"><strong>WSGI servers promote scaling</strong>. Serving thousands of requests for dynamic
163
+
content at once is the domain of WSGI servers, not frameworks.
164
+
WSGI servers handle processing requests from the web server and deciding
165
+
how to communicate those requests to an application framework's process.
166
+
The segregation of responsibilities is important for efficiently scaling
0 commit comments