Mixlr would likely not exist in its current form today if it wasn’t for Puppet. We don’t go quite that far, but we do make use of Lua to further fine-tune our HTTP services, implement advanced page-caching strategies, and a lot more besides. The possibilities here are clearly many - others have even implemented entire web application frameworks using Nginx and Lua. Lua code can be triggered at numerous points of the Nginx request/response cycle, giving us arbitrary programmatic access to the entire Nginx environment (not to mention external HTTP services, Redis, and more). It’s so small that it’s become a de facto choice for embedded systems, making appearances in many games and industrial software packages.įor Mixlr, its allure is in its ability to be embedded in the Nginx web server. Lua is a compact, powerful (and characterful) scripting language. Stackoverflow update: 560M page views a month, it’s all about performance.Much like Redis, it’s also another great example of a highly efficient, elegant tool that just works. This avoids most unnecessary backlogs forming when proxying requests, meaning our users are much more likely to be served the content they want as quickly as possible.Īnd of course a smaller pool of backend servers saves us a bunch of money and time too. Sticking with HTTP processing tools, The Haproxy loadbalancer is another essential part of our infrastructure.Īlthough Nginx provides some duplicate functionality, Haproxy’s low-level and fine-grained configurability allow us to make the most of a relatively small pool of backend Ruby on Rails servers. Let’s not forget its integration with the Lua scripting language, discussed more below. Its event-driven design makes serving static files, assets and images incredibly pain-free.Īnd its modular configuration system allow us to easily optimise, secure and otherwise polish every part of our website and API. It is also responsible for serving almost every HTTP request received by the Mixlr website, API and backend services. Nginx has quickly usurped Apache to become the most popular front-end web server in the world. Using Redis at Pinterest for billions of relationships.The Redis source code is regularly hailed as an example of concise, well-written C. For this reason, we are careful to never put data into Redis that we wouldn’t be too unhappy to lose without warning. As with Maslow’s hammer, there is a tendency for everything to start to look like a candidate for storing or processing in Redis - even when there are better options for data persistence readily available. If there’s one thing not to love about Redis, it’s just a little bit too versatile. From acting as a short-term caching layer a la Memcached, storing sessions for our web application, or acting as a pubsub server delivering real-time messages to tens of thousands of client applications - it just works. This fast, stable and elegant example of open source software powers many things at Mixlr. What are the pros and cons of PostgreSQL and MySQL?.Postgres has other advantages too: helpful EXPLAIN output, advanced constraints and a host of custom cell types for modelling data like IP addresses, JSON and complex container types, to name but a few. This is an area that MySQL in particular is notoriously deficient in, and had previously caused our development team numerous pulsating headaches. Our experiences with Postgres so far have been very positive, especially bearing in mind that after five years of running a fast-growing startup we have a lot of data to deal with.Įven when working with tables containing hundreds of millions of rows, Postgres allows us to continue carrying out many routine administration tasks - such as adding or removing columns or building indexes - without locking tables and forcing our service offline. PostgreSQL has been our main database since we migrated away from MySQL in early 2015. This post offers an overview of some of our favourite examples, and why they play such a big part in building our service. We rely on a host of amazing open source technologies to build the Mixlr platform. If you're a backend developer who is passionate about building rock-solid, high-availability systems using open source technology, you may find Mixlr to be a great team to join. By Rob 10 open source technologies we use at Mixlr
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |