From Wikitech
Jump to navigation Jump to search

Mathoid is a stateless node service on the sca cluster. It gets POST requests from MediaWiki containing mathematical formulas in LaTeX, and returns JSON with MathML and SVG renderings of the formula. An early version used PhantomJS for the rendering, but this was replaced with MathJax directly in nodejs before deploy. As such, this service does not shell out or store anything in the file system.


Deployment is currently using trebuchet. Ambox notice.png Possibly outdated.

# on tin 
cd /srv/deployment/mathoid/mathoid
git deploy start
git pull
git deploy sync



The service listens on port 10042. Example request:

curl -XPOST -d'q=e=mc^2' http://sca1001:10042/

This should return JSON with 'mml' and 'svg' members.


/var/log/mathoid/main.log on each node.


The SCA cluster is load balanced through LVS. The failure of an individual node does not affect the availability of the service.

Restarting a node

service mathoid restart

See also