Skip to content
GeoWill edited this page Feb 24, 2020 · 2 revisions

Data

Website

Pre-election

  • Add deadline for registering to vote to "Register to Vote" card example
  • Add date of polling day to "You don't need your poll card to vote" card example
  • Add election-specific keywords/info to site meta-data example
  • Add polling day specific content example

After registration deadline

  • Remove "Register to Vote" card until polling day example
  • If there are elections in Scotland, switch the councils importer to import council contact details, rather than VJBs example

Post-election

  • Put front end back how it was example
  • If there were elections in Scotland, switch the councils importer back to VJBs example

Its probably possible to automate some of that based on NEXT_CHARISMATIC_ELECTION_DATE

Deployment

When there isn't a scheduled election happening, we run our servers on burstable instances (t3.size) to save on hosting costs. In the run-up to a scheduled election, we need to scale up:

  • RDS logger instance should live on a db.m3.large for a major election (e.g: general election, national referendum, etc). It can probably get away with being on a db.m3.medium for smaller elections (local councils, PCCs, etc) but scaling RDS up/down requires downtime so be conservative and plan ahead.
  • Elasticache Redis instance can continue to live on a single burstable instance even when there is a major election happening as long as it is only tracking API usage to enforce rate limits. If the usage pattern for Redis changes, review this.
  • Nodes in the front-end cluster should be deployed to m5d.large instances in the period leading up to an election. This is configured in the deploy repo: https://github.com/DemocracyClub/polling_deploy/commit/e8ba2a54652acbf209d94060a9449c13483e8692
  • In the "off-season" we query EveryElection directly for election info. When there is a major scheduled election, each instance hosts its own local mirror - switch over to use the mirrors so that EveryElection doesn't choke out under traffic and ensure the synchronisation job is scheduled: https://github.com/DemocracyClub/polling_deploy/commit/dcc5c89253911856e4895301b8892d140c0cd74f Switch it back to use elections.democracyclub.org.uk some time after polling day.