AWS
MySQL: deleting a huge amount of rows
One of our MySQL tables has started to grow out of control with more than 1 billion rows (that’s 109).
The table is a typical “Rails Active-Record table” with id as primary key (auto increment), created_at, updated_at and a few columns for the business data.
The table has multiple indexes on various columns, some of them having a cardinality in the millions. created_at and status don’t have an index.
The majority of results from Google, involved peoples with millions of rows and deleting them in batches of 1000.
Read More…
From Wordpress to Hugo
As mentioned in Going Static, I migrated my Wordpress blogs to a static site build with Hugo. Most articles on the subject convinced me that it would be easy. The truth is, it isn’t that straight forward.
Content With help of a Wordpress plugin, exporting your posts and content is easy. The plugin adds the necessary front matter in Yaml format. But you still need to go through all your posts to update manually all image references.
Read More…
The Corporate Disease
The tech B2B world has changed in the last decade. It used to be sales talks to sales and agree on a product and price. Then give the job to the tech team.
In a tech-startup, Geeks are King. They decide what’s useful or usable.
If you can’t convince the geek, you won’t get the business.
At Spuul, I am on geek-side of the chain, and too often I had to experience the lack of market knowledge from some corporations.
Read More…
AWS, VPN and Public IP
Once you start to integrate services with Telcos, ISPs or other major Network players who are not “Cloud Aware”, you will need to go the VPN way using IPSec. Their setups have used all the available IP’s defined by RFC 1918 (or just don’t want to use them). They will want to use Public IP’s behind your VPN.
The problem is that your EC2 instances are running behind a 1:1 NAT with only a private IP’s attached to them. To add to the complexity, your instances are part of an auto-scaling group, with IP’s all over 10.0.0.0/8.
Luckily the way to solve this problem is actually quite easy, we just need to add some iptables rules and a proxy.
Read More…
Dynamically resizing EBS volumes
AWS provides multiples services that adjust sizes to your actual usage. This is not really the case when it comes to EBSEBS.
You can see EBS has a hard drive that you can attach to a running EC2 instance. The attached EBS will be accessible like any other driver under /dev/xvdX.
The idea here, is to provide a way to increase and decrease the size of the used EBS volumes according to the actual usage of the disk, and even allow you to increase the partition size beyond the 1TB limit.
Read More…
Skip use of CDN near hosting region
The server hosting this domain is a VPS hosted in Switzerland by Nimag network SàRL. Access speed from Asia is pretty bad, specially due to network latency on the pipes Singapore-US and US-Europe. In using a CDN to serve assets, we improve global page loading time in lowering the loading times of assets.
The VPS has a good European connexion, there is not much need for visitors in Europe to use a CDN.
Read More…
Network Speed Testing
Everyone is aware of tools like speedtest.net to get a sens of the Internet connectivity speed to certain regions. While it works on mostly every device it allows you to test speed to only one server at a time. And is primarily meant to test the speed of your ISP. I wanted to test connectivity to several part of the world in an one click way, usable on multiple devices.
The answer didn’t struck me at once, but it all can be done with some Javascript and mainly with the xhr object.
Read More…