Skip to content

Commit 3844a55

Browse files
committed
Updating servers section.
1 parent 7a5fd46 commit 3844a55

File tree

11 files changed

+253
-60
lines changed

11 files changed

+253
-60
lines changed

feeds/all.atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2013-01-04T17:15:39Z</updated></feed>
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2013-01-11T13:44:18Z</updated></feed>

index.html

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<li><a href="#web-framework">Web Framework</a></li>
5555
<li><a href="#content-delivery-network">CDN</a></li>
5656
<li><a href="#web-analytics">Web Analytics</a></li>
57+
<li><a href="#caching">Caching</a></li>
5758
<li><a href="#change-log">Change Log</a></li>
5859
</ul>
5960
</div>
@@ -95,7 +96,7 @@ <h2>About the Author</h2>
9596
</section>
9697
<section id="servers" class="tech-section">
9798
<h1>Servers</h1>
98-
<p>There are several options for setting up infrastructure to serve a
99+
<p>There are four options for setting up infrastructure to serve a
99100
web application:</p>
100101
<ol class="arabic simple">
101102
<li>&quot;Bare metal&quot; servers</li>
@@ -108,13 +109,25 @@ <h2>Bare metal</h2>
108109
<p>The term <em>bare metal</em> refers to purchasing the actual hardware and hooking
109110
it up to the Internet either through a business-class internet service
110111
provider (ISP) or
111-
<a class="reference external" href="http://webdesign.about.com/od/colocation/a/what_colocation.htm">co-locating the server</a> with other servers.</p>
112+
<a class="reference external" href="http://webdesign.about.com/od/colocation/a/what_colocation.htm">co-locating the server</a> with other servers. A &quot;business-class&quot; ISP is necessary because
113+
most residential Internet service agreements prohibt and will eventually
114+
block traffic to web servers. You may be able to get away with low traffic
115+
volume but if your site serves a lot of traffic it will catch an ISPs
116+
filters.</p>
112117
<p>The bare metal option offers the most control over the server configuration,
113118
usually has the highest performance for the price, but also is the most
114119
expensive upfront option and the highest ongoing maintenance. With bare
115120
metal servers the ongoing operating cost is the electricity the server(s)
116-
use as well as handling repairs when server components malfunction.</p>
117-
<p>Buy actual hardware from a vendor either pre-built or as a collection of components that you assemble yourself.</p>
121+
use as well as handling repairs when server components malfunction. You're
122+
taking on manual labor working with hardware as well as the rest of the
123+
software stack.</p>
124+
<p>Buy actual hardware from a vendor either pre-built or as a collection of
125+
components that you assemble yourself. Here is an
126+
<a class="reference external" href="http://duartes.org/gustavo/blog/post/building-a-quad-core-server">example of a server buildout</a>. The post is a couple of years old but those are the
127+
rough components you need to put together your own server. You can also buy
128+
pre-configured servers from Dell or HP. Those servers tend to be in
129+
smaller case form factors (called &quot;blades&quot;) but are correspondingly more
130+
expensive than putting off-the-shelf components together yourself.</p>
118131
</div>
119132
<div class="section" id="virtualized-servers">
120133
<h2>Virtualized servers</h2>
@@ -147,17 +160,39 @@ <h2>Infrastructure-as-a-service</h2>
147160
dynamic upscaling for heavy traffic. When traffic is low then virtualized
148161
servers can solely be used. This combination of resources reduces cost at
149162
the expense of greater complexity in the dynamically scaled infrastructure.</p>
163+
<p>The most common IaaS platforms are
164+
<a class="reference external" href="http://aws.amazon.com/">Amazon Web Services</a> and
165+
<a class="reference external" href="http://www.rackspace.com/cloud/">Rackspace Cloud</a>.</p>
166+
<p>The disadvantage to IaaS platforms is the lock-in if you have to write
167+
custom code to deploy, dynamically scale, and generally understand your
168+
infrastructure. Every platform has its quirks. For example,
169+
Amazon's standard <a class="reference external" href="http://aws.amazon.com/ebs/">Elastic Block Store</a> storage
170+
infrastructure has at least an order of magnitude worse I/O throughput
171+
than working with your local disk. Your application's database queries may
172+
work great locally but then when you deploy the performance is inadequate.
173+
Amazon has <a class="reference external" href="http://aws.amazon.com/about-aws/whats-new/2012/07/31/announcing-provisioned-iops-for-amazon-ebs/">higher throughput EBS instances</a>
174+
but you will pay correspondingly more for them. EBS throughput is just
175+
one of many quirks you need to understand before committing to an
176+
IaaS platform.</p>
150177
</div>
151178
<div class="section" id="platform-as-a-service">
152179
<h2>Platform-as-a-service</h2>
153-
<p>Platform-as-a-service (PaaS) refers to a class of services that will host
154-
an application with a layer between the server and the application. The
155-
layer defines how the application accesses resources such as computing
156-
time, files, and external services. The tradeoff to PaaS is usually
157-
ease of deployment to a specific architecture as long as you do things
158-
&quot;their way.&quot;</p>
180+
<p>A platform-as-a-service (PaaS) provides infrastructure and a software layer
181+
on which a web application is deployed. The PaaS layer defines how the
182+
application accesses resources such as computing time, files, and
183+
external services. The PaaS provides a higher-level abstraction for working
184+
with computing resources than deploying an application to a server or IaaS.</p>
185+
<p>A PaaS makes deployment and operations easier because it forces the developer
186+
to conform applications to the PaaS architecture.</p>
187+
<p><a class="reference external" href="http://www.heroku.com/">Heroku</a>,
188+
<a class="reference external" href="https://developers.google.com/appengine/">Google App Engine</a>,
189+
<a class="reference external" href="https://gondor.io/">Gondor</a>, and
190+
<a class="reference external" href="https://openshift.redhat.com/community/get-started/python">OpenShift</a> are
191+
platform-as-services that support Python web applications. Each one requires
192+
varying tradeoffs to deploy to their respective platforms.</p>
159193
<p>If you go the PaaS route, you can skip over the operating system and web
160-
server sections because they are baked into PaaS offerings.</p>
194+
server sections because they are baked into PaaS offerings. PaaS offerings
195+
generally start at the WSGI server layer.</p>
161196
</div>
162197
<div class="section" id="server-monitoring">
163198
<h2>Server Monitoring</h2>
@@ -169,17 +204,13 @@ <h2>Server Monitoring</h2>
169204
</div>
170205
<div class="section" id="server-resources">
171206
<h2>Server Resources</h2>
172-
<p><a class="reference external" href="http://www.heroku.com/">Heroku</a>,
173-
<a class="reference external" href="https://developers.google.com/appengine/">Google App Engine</a>,
174-
<a class="reference external" href="https://gondor.io/">Gondor</a>, and
175-
<a class="reference external" href="https://openshift.redhat.com/community/get-started/python">OpenShift</a> are
176-
platforms-as-a-service that support Python web applications.</p>
177207
<p><a class="reference external" href="http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/">How to set up a safe and secure Web server</a> (Ars Technica)</p>
178208
<p><a class="reference external" href="http://www.kalzumeus.com/2010/12/12/staging-servers-source-control-deploy-workflows-and-other-stuff-nobody-teaches-you/">Staging Servers, Source Control &amp; Deploy Workflows, And Other Stuff Nobody Teaches You</a> (Patrick McKenzie)</p>
179-
<p><a class="reference external" href="http://blog.redfern.me/choosing-a-low-cost-vps/">Choosing a low cost VPS</a>
180-
(Joe's Blog)</p>
181209
<p><a class="reference external" href="http://rdegges.com/devops-django-part-4-choosing-heroku">Choosing Heroku</a>
182210
(Randall Degges)</p>
211+
<p><a class="reference external" href="http://blog.redfern.me/choosing-a-low-cost-vps/">Choosing a low cost VPS</a></p>
212+
<p><a class="reference external" href="https://github.com/boto/boto">boto</a> is an amazing Python library for
213+
working with Amazon Web Services</p>
183214
</div>
184215

185216
</section>
@@ -309,6 +340,8 @@ <h2>WSGI Resources</h2>
309340
<a class="reference external" href="http://code.google.com/p/modwsgi/">mod_wsgi</a>,
310341
<a class="reference external" href="https://github.com/unbit/uwsgi-docs">uWSGI</a>, and
311342
<a class="reference external" href="http://www.gevent.org/">gevent</a> are common WSGI server implementations.</p>
343+
<p><a class="reference external" href="http://www.apreche.net/complete-single-server-django-stack-tutorial/">Complete single server Django stack tutorial</a> is thorough and informative for
344+
non-paas hosting choices.</p>
312345
</div>
313346

314347
</section>
@@ -388,12 +421,22 @@ <h1>Web Analytics</h1>
388421
<div class="section" id="web-analytics-resources">
389422
<h2>Web Analytics Resources</h2>
390423
<p><a class="reference external" href="http://blog.arkency.com/2012/12/google-analytics-for-developers/">Google Analytics for Developers</a></p>
424+
</div>
425+
426+
</section>
427+
<section id="caching" class="tech-section">
428+
<h1>Caching</h1>
429+
<p>Caching can reduce load on servers by storing the results of common
430+
operations and serving the precomputed answers to clients.</p>
431+
<div class="section" id="caching-resources">
432+
<h2>Caching Resources</h2>
391433
</div>
392434

393435
</section>
394436
<section id="change-log" class="tech-section">
395437
<h1>Change Log</h1>
396-
<p>2013.01.04: Added initial trial of a WSGI server -&gt; web server -&gt; browser diagram. Updated web server and OS sections.</p>
438+
<p>2013.01.11: Fleshing out server section, particularly IaaS and PaaS.</p>
439+
<p>2013.01.04: Added initial trial of a WSGI server -&gt; web server -&gt; browser diagram. Updated web server and OS sections.</p>
397440
<p>2013.01.02: Minor updates to OS section.</p>
398441
<p>2012.12.30: Updated introduction with improved wording. Working on CDN section. Added very basic database content and removed stub from that section.</p>
399442
<p>2012.12.27: Added beginning of section on Python web frameworks. Added stub for content delivery network.</p>

pages/caching.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!doctype html>
2+
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
3+
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
4+
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
5+
<!--[if gt IE 8]><!-->
6+
<html class="no-js" lang="en"> <!--<![endif]-->
7+
8+
<head>
9+
<meta charset="utf-8">
10+
<meta name="language" content="English" />
11+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
12+
13+
<title>Full Stack Python</title>
14+
<meta name="description" content="Full stack Python shows how an entire Python web application is built, from the server to the front end JavaScript.">
15+
<meta name="author" content="Matt Makai">
16+
<meta name="viewport" content="width=device-width,initial-scale=1">
17+
<link rel="stylesheet" href="/css/c.css" />
18+
<link rel="stylesheet" href="/css/bootstrap-responsive.min.css" />
19+
<script src="/js/modernizr-2.0.6.min.js"></script>
20+
<script type="text/javascript">
21+
22+
var _gaq = _gaq || [];
23+
_gaq.push(['_setAccount', 'UA-19910497-7']);
24+
_gaq.push(['_trackPageview']);
25+
26+
(function() {
27+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
28+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
29+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
30+
})();
31+
32+
</script>
33+
</head>
34+
35+
<body>
36+
<div class="container">
37+
<div class="row">
38+
<div class="span12">
39+
<div class="logo-header-section">
40+
<a href="/"><img src="../img/full-stack-python-logo-bw.png" height="42" width="42" class="logo-image" /></a>
41+
<span class="logo-title"><a href="/">Full Stack Python</a></span>
42+
</div>
43+
</div>
44+
</div>
45+
<h1>Caching</h1>
46+
47+
48+
<p>Caching can reduce load on servers by storing the results of common
49+
operations and serving the precomputed answers to clients.</p>
50+
<div class="section" id="caching-resources">
51+
<h2>Caching Resources</h2>
52+
</div>
53+
54+
<hr/>
55+
<div class="footer pull-right">
56+
<a href="http://www.mattmakai.com/" class="underline">Matt Makai</a> 2013
57+
</div>
58+
</div>
59+
60+
<script src="http://code.jquery.com/jquery-latest.js"></script>
61+
<script src="/js/bootstrap.min.js"></script>
62+
</body>
63+
</html>

pages/change-log.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
<h1>Change Log</h1>
4646

4747

48-
<p>2013.01.04: Added initial trial of a WSGI server -&gt; web server -&gt; browser diagram. Updated web server and OS sections.</p>
48+
<p>2013.01.11: Fleshing out server section, particularly IaaS and PaaS.</p>
49+
<p>2013.01.04: Added initial trial of a WSGI server -&gt; web server -&gt; browser diagram. Updated web server and OS sections.</p>
4950
<p>2013.01.02: Minor updates to OS section.</p>
5051
<p>2012.12.30: Updated introduction with improved wording. Working on CDN section. Added very basic database content and removed stub from that section.</p>
5152
<p>2012.12.27: Added beginning of section on Python web frameworks. Added stub for content delivery network.</p>

0 commit comments

Comments
 (0)