Skip to content

Web Log

My book "Webmin Administrator's Cookbook" available from Packt

I recently wrote a book about administering Linux servers with the aid of the friendly and versatile utility called Webmin. The book covers a wide variety of topics, from setting up and securing a new server to running and monitoring databases (MySQL, Postgres), a web server (Apache) and a mail server (Postfix).

Webmin Administrator's Cookbook

The book is written as a series of 120 step-by-step recipes, which should be easily accessible to both novice and professional system administrators. Check it out to see how Webmin can make your life easier. The book is currently available from Packt Publishing.

Performance testing Django applications with The Grinder

Performance testing web applications is a little tricky when we want to test features accessible only to logged in users. Automated test recorders intercept session cookies and hardcode them into test scenarios. When we run these tests later, different session IDs are generated and recorded cookie values don't grant access anymore. This text demonstrates how to write a scenario for The Grinder to test a Django application. Tests include user login, submitting CSRF-protected forms and AJAX requests.

Serving multiple Django applications with Nginx and Gunicorn

Nginx makes a great server for your Gunicorn-powered Django applications. In this article I will demonstrate how you can run multiple Django applications on the same Nginx server, hosting sites on two different domains. Each application will be set up in its own Virtualenv and each will be owned by and run as a different user to limit consequences of a potential security breach.

Recording a website performance test for The Grinder using Chrome DevTools

The Grinder load testing framework is a good tool for stress testing your website or application. It can run tests in parallel on multiple machines, allowing you to check how your application would behave under heavy load. This makes it possible to determine your app's weak points, so you can proceed to optimize them. Unfortunately the TCPProxy component provided with The Grinder sometimes produces flawed testing scripts. I created a simple tool called har2grinder, which produces Grinder test scripts from HAR files. This allows you to record a browsing session using Chrome's DevTools and then run it in the Grinder.

PyWaw Presentation

Slides for a presentation I'm giving today at Warsaw's Python User Group meetup PyWaw.

Using Redis as Django's session store and cache backend

Redis is an in-memory key-value store, somewhat similar to Memcached. Because Redis keeps its dataset in memory, storage and retrieval is very fast. It's a good idea to use this kind of solution for storing ephemeral application data, such as contents of the cache, or temporary information associated with active user sessions. This unburdens your database system from performing unnecessary read and write operations and can considerably speed up your application. Modules for using Redis together with Django are available and quite easy to set up.