Filled in reason #3 to submit separate out celery.
[mediagoblin.git] / docs / source / production-deployments.rst
1 =========================================
2 Considerations for Production Deployments
3 =========================================
4
5 This document contains a number of suggestions for deploying
6 MediaGoblin in actual production environments. Consider
7 ":doc:`deploying`" for a basic overview of how to deploy Media
8 Goblin.
9
10 Celery
11 ------
12
13 While the ``./lazyserer.sh`` configuration provides an efficient way to
14 start using a MediaGoblin instance, it is not suitable for production
15 deployments for several reasons:
16
17 1. In nearly every scenario, work on the Celery queue will need to
18 balance with the demands of other processes, and cannot proceed
19 synchronously. This is a particularly relevant problem if you use
20 MediaGoblin to host Video content.
21
22 2. Processing with Celery ought to be operationally separate from the
23 MediaGoblin application itself, this simplifies management and
24 support better workload distribution.
25
26 3. If your user submits something complex and it needs to process,
27 that's extra time your user has to sit around waiting when they
28 could get back immediately to doing things on the site.
29 Furthermore, if that processing step takes a long time, as it
30 certainly will for video, your user won't just be left waiting,
31 their connection will probably time out.
32
33 Basically, if you're doing anything other than trivial images for a
34 small set of users (or something similarly trivial, like ascii art),
35 you want to switch over to doing a separate celery process.
36
37 Build an :ref:`init script <init-script>` around the following
38 command.
39
40 CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery ./bin/celeryd
41
42 Modify your existing MediaGoblin and application init scripts, if
43 necessary, to prevent them from starting their own ``celeryd``
44 processes.
45
46 .. _init-script:
47
48 Use an Init Script
49 -------------------
50
51 TODO insert init script here
52
53 Other Concerns
54 --------------
55
56 TODO What are they?
57