AWS
Cors at the Edge
With the raise of API driven apps, CORS is becoming an unavoidable subject. By adding a CDN, your CORS rules become a burden on caching.
Creating a Serverless GeoIP API
Why build a GeoIP API when you can buy it directly from Maxmind or use their GeoIP Databases?
Using the downloadable database works well when used on an instance. When you need it inside Lambda or Glue, it becomes difficult to keep it up-to-date.
It becomes easier to use an external HTTP-API. Hosting it yourself reduces the response time by having it nearer to your apps and you can extend your service by combining multiples sources.
Read More…
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. We had the problem amplified by 103.
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. Depending on the amount of posts and images you have, this can be a tremendous task.
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. If I have to spend endless hours in meetings, sign an endless trail of paperwork and involve all departments of the company just to be able to start testing a service, the game is not worth it. It doesn’t matter how good your product is or how well Gartner ranks you. You are just too much hassle.
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. The other reason, is to lower the traffic costs on the CDN level.
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…