Dariusz Cieślak's Blog on Software

09/10/2008

Is Your Hosting Oversold?

Filed under: en — Tags: — dariusz.cieslak @

Hosting is cheaper than virtual server or dedicated machine on a network. This fact is true because resources are shared between many customers and one can place hundreds of accounts on one physical server. Adding too much accounts leads to slowing server responses and to instability in general. It’s called overselling. Do you know how to check if your hosting account is overselled?

The Fighters

I’m comparing three hosting providers here:

  • DreamHost.com – popular host provider from USA
  • Kei.pl – good hosting, 24/7 administration from Poland
  • Linuxpl.com – Polish company, servers in Germany, cheap hosting with SSH option

I’m using separate Linux box located in Poland to reach analysed servers with few tools (awk, cron, bash).

(more…)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

04/10/2008

Using FastCGI on a shared hosting

Filed under: en — Tags: — dariusz.cieslak @

CGI is a standard protocol to run dynamic web-apps using HTTP protocol. It’s advantage: standard, available everywhere, disadvantages: it’s slow (a process is created for every HTTP request). To overcome this limitations FastCGI has been created (one process serves many HTTP requests). But not everywhere FastCGI is supported. I’ll show how to use special bridge to use FastCGI on CGI-only environment.

First, we have to download current FastCGI development kit then compile cgi-fcgi binary usging the same architecture as our hosting provider uses. Then copy compiled binary to server and create small script to run our bridge, lets name it app.bridge:

    #! ./cgi-fcgi -f
    -connect app.sock app.fcgi 1

Here “1″ means: create one process, multiple requests will be handled by internal thread manager in application.  If your application is not multi threaded you can pass higher number here.

The bridge file must have correct permissions and the following fragment must be added to .htaccess to allow to call this bridge script:

    Options +ExecCGI
    AddHandler cgi-script .bridge

That’s all, folks!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Git Version Control System usage techniques

Filed under: en — Tags: — dariusz.cieslak @

We (Aplikacja.info) are a small Polish software company that write mostly in Python language and use Linux for development. GIT is an advanced version control system that was created by Linux Torvalds for maintain Linux kernel source tree. I’ll show how git can be connected in Unix shell environment with make tool.

Why GIT have been chosen to support our version control needs?

  • Failure in development server will not block our work
  • Access to history is very fast (it’s stored on every working copy)
  • I used to work during flight, GIT supports all VCS operations off-line (commit, diff, etc.)

The hard thing about GIT is that it may confuse beginners. If you are one, remember:

  • Always use git diff HEAD instead of git diff
  • Always using git commit -a instead of git commit

Some of this gotchas have been addressed by some GIT interfaces, but they are deprecated now.

In order to ease GIT (and earlier, CVS) usage we introduced additional Makefile targets that handle typical source control tasks.

(more…)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Powered by WordPress