Cacti is an awesome tool but it requires quite a lot of manual work to setup new metrics measurement and begin graphing. As i am a total monitoring freak i love to have insight into different aspects of my applications. I love to export custom metrics and graph them in cacti but i found it too time consuming so i hacked a cacti graph and input method generator this weekend. The code is a bit primitive so please forgive me but i needed it to do just one particular thing it is not a multi purpose code really :)
I think some of you may find it useful as learning cacti for the first time and manually setting up custom graphs can be difficult so this script should help, check it out.
I have looked at the state of different messaging backends recently and i ran a little benchmark to see what is the rough comparison of message publishing throughput. Results that i got are quite surprising.
What i wanted to achieve was some sort of reassurance before choosing a messaging bus for my PHP project. PHP is usually a bit special as it's runtime environment is different than java / .net. I wanted to use rabbitmq because of it's routing flexibility and implementation of AMQP. After the simple benchmark i am not convinced any more if that is the best way to go for me right now.
I have played around with CouchDB half year ago and it's performance was just horrible. I have heard a lot of good about mongodb recently so i thought i will have a look at it.
I think that NoSQL can have really good use cases in web. The problem is that you need a really performant and stable system if you want to use it in production. I ran just a few simple tests so its not a real benchmark or anything. It is just a simple test trying to figure out how far behind are nosql solutions (performancewise).
Personally i think it is a good book but it lacks details, tools and practical solutions. Reading the book is quite enjoyable and it definitely contains a lot of useful tips and tricks.
What i liked the most is the fact that the book is meaty and condensed down to less than 150 pages. I really like books that are focused so i was not disappointed here.
The thing that author covers really well is the analysis and preparations of the testing plan and processes around it. You will read a lot about what to consider, how to prepare your self, what to check etc. There are also some useful checklists.
Good news, another good book!
The Art of Capacity Planning is a really decent book with a good overview of how to measure and predict web based applications load.
Book is very short (130 pages) but I love that in books. Author does not waste time nor paper just goes straight to the point.
Terracotta is an amazing piece of software and it comes with some really cool tools and features. To enable Tomcat 6 session replication via terracotta you need to do a few things but its relatively simple lets do it.
Finally i got a book that is truly worth recommending! It is a very good book and i think every web developer should read it.
Book is a sort of a continuation of another good book High performance websites but to be honest i think i like this one more.
Book is very condensed, there is no wasted page in it. Information is well structured and you can see that authors prepared well for the publishing. Information is backed by a decent research and some of the tricks are really cool.
When you build PHP applications you need cache storage to keep your calculated data in. There are quite a few options and use case decides which solution is better.
I knew that APC is faster than memcached as there is much less overhead but I wanted to see how memcached would compare to APC user cache.
Circuit breaker is a component that supports high relaiability of web sites. It helps discovering, at runtime, which of the external dependencies are failing. Having that knowledge application can avaid wasting time on trying to call them untill they are back online.
Current PHP application may depend on several databases, soap/rest web services, external cache providers or data grids, mail, ftp etc.
It is important for the application to keep on functioning even if some of these dependencies fail. To do that application has to be able to track when services become unavailable and when they become active again.
If a database or web service is down we want our application to detect it as soon as possible and react accordingly. Maybe application has a secondary slave database that can be read from? Maybe there is a way to load cached data? If all fails maybe its best just to hide some function or display message that service will be fully functional soon. What we want to avoid is making every user wait 30s for the database connection (which has to fail any way).
UPDATE: project was moved to github a while back as an independant PHP library php circuit breaker
I have worked with Grails lately and i have to say it seems like it may be the technology i was looking for! I am a skeptic by nature but I am getting more and more excited about Grails. It is really a cool and deeply thought out framework for all web development needs.
Why is Grails better than Rails?
Some might say that jruby will let you do the same thing and keep it old school (ruby not groovy). To be honest, i don't like Ruby as a language that much. I have read some articles/books (just a few) and i have read some code as well. I must say it seems to me more like perl than Java. Maybe its just matter of personal taste but ruby seems little bit messy to me.
I have read some time ago that there is UDP support in Memcached. I did not really pay attention to it as i did not need it back then. Recently we wanted to improve the delays and concurrency on our memcached servers and i thought maybe UDP could come in handy.
I had a chance to work a bit with a new page speed and JS mimification tool from google and i have to say its really cool.
The tool i am talking about is closure compiler and page speed and you can find it here
Web performance is not all about database calls and PHP speed. Its also about how many elements you have to be downloaded, in what order, how big are they, can they be cached, can they be compressed etc. Page speed helps you to figure out how to speed up the loading time not the html generation time. Pages consist of many js, css files as well as images. Knowing what causes delays is crucial to successful website performance optimization.
I have said it already and ill say it again, i really dont like Mac. I cant figure out why some people insist its so cool.
Any way, as always i have to develop in different environment than run the live apps. I develop on mac and im using xamp as everyone else does in the team. From time to time we need some new module or some module is outdated or something and we have to compile stuff manually. Its real hassle.
In my previous companies we used to serve sessions from mysql via a custom made session handlers and to be honest we never really had any problems with it. I cant actually remember the traffics and concurrency rates but it was not that low. Currently the solution im working with uses memcached for sessions storage, the default build in session handler. I am a bit worried about the way it works with memcached.
Problems with memcached sessions in PHP
First of all memcached is a cache storge engine and it was not designed with sessions in mind. The way php extension uses memcache causes a few more problems in the long run. Here are my concerns:
Having a busy website requires a few techniques to optimize the performance of caches. It is not that difficult and should help you reduce the load times (pessimistic load times) a whole lot.
Imagine you have home page cache (as fragments or entire page). Its all good and beautiful as long as it sits in the cache. All threads connect to cache, get the content and send to the user. What happens when the cache expires? Well all threads have to rebuild it. Unfortunately on very busy content elements it can cause dozens of processes trying to rebuild the same page!