- Having the WeBWorK files stored on a file share means that any request that opens many files can be very slow. This means a lot of patience when using the Library Browser. It doesn't seem to impact students.
- When servers fail, they don't necessarily do so gracefully. If a server powers down completely, then things tend to switch over as expected. If a server becomes unresponsive (runs out of memory, disk, etc.), then the other nodes don't always declare it dead, and may continue to try to use it.
I can't add a lot to the discussion myself since at Rochester we have only about 1K students per semester and since we don't use WW in class (just for homework) they are not all hitting the server at once. For us nearly any modern computer (and sometimes even a pretty old one) is adequate.
The only shared resource between webservers in the cluster will be an NFS mount which contains the /opt/webwork/courses, /opt/webwork/webwork2/DATA, /opt/webwork/webwork2/logs, and /opt/webwork/webwork2/tmp directories, which I believe are the only places the webservers must have write access to. I'm hoping this will minimize the performance impact by not sharing the entire /opt/webwork directories... I guess it should a bit, theoretically?
Jeremy
# Contains non-web-accessible temporary files, such as TeX working directories. $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; |
|
# Location of web-accessible temporary files, such as equation images.
# These two should be set in localOverrides.conf -- not here since this can be overwritten by new versions.
$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp";
$webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp";
# Location of cached equation images.
$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
Less often used is:
# Location of system-wide data files. $webworkDirs{DATA} = "$webworkDirs{root}/DATA"; # Used for temporary storage of uploaded files. $webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads";
These are defined in defaults.config and can be overridden in localOverrides.conf.https://github.com/openwebwork/webwork2/blob/master/conf/localOverrides.conf.dist#L362
############################################################################### # Directory for temporary files ################################################################################ # Location of web-accessible temporary files, such as equation images. # Default which is set in defaults.config: #$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp"; #$webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp"; # Alternate locations -- this allows you to place temporary files in a location # that is not backed up and is the recommended set up for most installations. # See http://webwork.maa.org/wiki/Store_WeBWorK%27s_temporary_files_in_a_separate_directory_or_partition # for more information. Note that the wwtmp directory (or partition) should be # created under Apache's main server document root which is usually /var/www. If this # is in a different location on your system, edit the lines below accordingly. # To implement, uncomment the following 6 lines: #$webworkDirs{htdocs_temp} = '/var/www/wwtmp'; #$webworkURLs{htdocs_temp} = '/wwtmp'; #$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations"; #$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations"; #$courseDirs{html_temp} = "/var/www/wwtmp/$courseName"; #$courseURLs{html_temp} = "/wwtmp/$courseName";
(3) Student work and for that matter normal editing by instructors does not modify the library directories. Those are not normally writable by the webserver. Instructor modifications to problems are all local to their course.
(It is possible to install a parallel, writable version of the webwork-open-problem-library to which certain instructors can be given access so that they can correct existing problems and add new problems to the Contrib directory of the OPL. -- see https://demo.webwork.rochester.edu/moodle/mod/page/view.php?id=662
as a provisional method for doing this. )
It's been a while since the last post here, and I haven't seen much other discussion on setting up a highly-available WeBWorK configuration in AWS. I recently established a HA deployment at Georgia Tech, and it seems to be working well so far. Here's what it looks like:
- Everything automatically deployed to AWS using Terraform (infrastructure) and Ansible (server configuration)
- WebWork configured in multiple EC2 instances (in separate AZs) behind an Application Load Balancer. The ALB handles SSL and the associated certificates.
- Amazon RDB as the MYSQL instance. Better to have this managed by AWS instead of me.
- Shared EFS filesystem for the EC2 instances.
There is discussion upthread about what to put on the shared file system (i.e., all of /opt/webwork, or selected folders). I settled on ONLY putting the courses and htdocs directories on the shared filesystem -- this seemed to be a happy compromise that seems to avoid inconsistent states across the various servers.
I didn't set up any symbolic links to the shared filesystem. Instead, I simply set $webwork_courses_dir and $webwork_htdocs_dir to their respective shared folders in site.conf.
I wanted to keep log files and temporary files on the individual EC2 instances -- both to maximize performance, and to prevent messy diagnostics if something went wrong on an individual server.
We're a week into Summer semester with this configuration, and so far everything seems to be working fine. Let me know if you spot any potential "gotchas" with this approach.