The first week of October was quite full of interesting/useful things/lessons. Here are some of them:
In the front-end app, I was working, the browser was always sending those requests
every time. You can cache the answers with the Access-Control-Max-Age
header, and I don't know why the
kcors library we were using had
maxAge disabled by default. This is making some pages loading time almost twice.
In EmberJS your route components can load a model. We had front-end routes like
user/application/adunit/action But we were loading almost everything in the last
element of the route path.
This leads to repeated code in the path leaves with complex
model() hooks where
you load many things that should be already there making the app slow. A small
refactor made page loads feel snappier.
Too much authentication
Besides preflight requests and loading too many things, our front-end is personalized depending on the role. We were not caching user roles so we were asking the back-end on almost every page for those roles.
The react-scripts package in React includes dotenv as a way to manage
environment configuration through files. Last week a new
was created and a
.env.local file was added. But it seems that
a special meaning in
dotenv and it was overriding my personal
How this happened is another lesson: someone that doesn't develop the project did the changes that broke the development environment. I believe working in pairs/more close with that person would have avoided this plus bringing a colleague in another location closer to the team.
AWS CodeDeploy long waiting times
While deploying the fix for the
Access-Control-Max-Age backend issue. I was
annoyed at how long it took AWS CodeDeply.
AllowTraffic steps took 10 minutes from the 11 minutes
deploy. It seems the long wait is due to health check configuration in the
Elastic Load Balancer of the service: 10 checks
every 30 seconds to raise a trigger, that's 5 minutes.
Learned to appreciate Nomad
Linkerd, this new project uses almost every tool from Hashicorp.
Packer before but Nomad was
a tool I couldn't find a use for. And this was till I saw all these tools working
together (Kudos to Avocarrot sysengs). I still like Kubernetes
more as a whole, but I was able to appreciate nomad as a tool for a specific job.