Thursday, July 26, 2018
Moving soon to a new hosting service
Moving soon to a new hosting service

My dear friend Kornel told me about a new hosting he has found. We used to keep our private stuff on Linode. It was an okay VPS. I was quite happy with it. However none of my sites there pay the bills and it costs me $10 / month. I know its nothing for an online presence - but then Kornel came with a new idea.
Its Digital Ocean. Looks like a hip thing. Only 5 bucks per month, SSD and stuff. The CPU is medium category and the entry level option has a single core. So its fine if you dont have to do CPU heavy operations but more IO. They have also a free month so of course I tried it out.
Easy registration and login. Then you can immediately enter the system. It allows you to create any amount of instances - so it seems the model is like a shopping cart. Youre not tied to a certain package. Creating a new instance is pretty easy, you can select the VPS configuration, OS, software packages, etc. You have SSH and I guess thats all you need at this point really from the service - the rest is in your hand.
Ive tried StatDiary just to see how the single core with SSD perform. I ran some AB - that was a bit suspicious, showing unstable conversion. Then I fired up JMeter and did a more thorough analysis with authorized access (using test accounts to miss the cache) and a few reports. I really love JMeter how useful in this situation. Its not too sophisticated and can give you a proper summary about the speed. It seemed Digital Ocean is 3 times slower than the basic Linode VPS. Linode served StatDiary around 200ms meanwhile it was 600ms from Digital Ocean. I added APC and it didnt really get better. Ive checked it and 70% was used from all the opcode cache and almost 99% percent is the hit rate. Ive ran YSlow and it was also pretty good. Only got bad marks on having images on a CDN, not adding them etags. All others were A and some B. Apache is using mod deflate on all outgoing text streams.
So at this point I have not much ideas how to make it even faster.
The real user experience is basically the same, practically you doesnt feel it worse. Lets say 600ms is not the end of the world, there are worse things.
Just to mention one - moving to a new server is a pain. I have the sites, the databases and mobile apps connected to the server (and sometimes to the IP). Its like an evil circle. In order to tell the app which server should be used you need a central service that tells this info - so this way you can adjust these details on-the-fly. However what makes sure that you dont have to move your central server.
Well, one thing Ive learned is to never use IP. Use the domain, at least that can be stable. To move the whole shebang now wont be easy. My current idea is the following:
- update the iPhone app that uses the domain name (no auto release plan)
- set up the mirror site on the new server
- set up remote access to the db (I know, but thats the most feasible transfer Ive come up with)
- copy db to new server
- point the old site to the new db
- at this point you can use the new server
- redirect the domain
- close db remote access
And now my first problem is releasing the new iPhone app version - which doesnt compile because of a broken architecture (armv7s) compilation in a linked static library - which takes me 1 - 6 weeks to fix usually. Funny thing I have no idea what skills I should grow to approach this problems faster. Life.
---
Peter