| | 62 | |
| | 63 | <!-- Flash message configuration |
| | 64 | |
| | 65 | Storing flash messages in RAM avoids conflict errors and ZODB |
| | 66 | bloat on anonymous reads, and gives a substantial performance |
| | 67 | boost (eg. the front page is 2.6 times faster, a story page is |
| | 68 | 1.8x faster). |
| | 69 | |
| | 70 | Disadvantage: We'd have to provide session affinity in the load-balancer. |
| | 71 | For nginx config, see http://wiki.codemongers.com/NginxHttpUpstreamModule |
| | 72 | And doing that substantially reduces the benefits of load-balancing. |
| | 73 | See design.txt in zope.session for more discussion. |
| | 74 | |
| | 75 | Alternative: This would be slower than RAM but would not |
| | 76 | require any load-balancer config: We could maybe go back to |
| | 77 | using z3c.flashmessage.sources.SessionMessageSource as the |
| | 78 | factory, but instead configure a persistent |
| | 79 | ISessionDataContainer named 'z3c.flashmessage' like so: |
| | 80 | |
| | 81 | <utility |
| | 82 | name="z3c.flashmessage" |
| | 83 | provides="zope.session.interfaces.ISessionDataContainer" |
| | 84 | factory="zope.session.session.SessionDataContainer" |
| | 85 | /> |
| | 86 | ... and then (how?) configure that container to live inside a |
| | 87 | TemporaryStorage mounted over ZEO. |
| | 88 | |
| | 89 | We could then also do the same for name="almanac" for the rest |
| | 90 | of our session data. |
| | 91 | --> |