Tit Petric's Blog, page 6
May 9, 2017
Creating a new shortcode with Hugo
For those of you not familiar with Hugo, it’s the tool with which I’m generating this blog. Hugo is a static website engine similar to Jekyll or Hexo if you’re familiar with those. You write your content in markdown format, and it generates a set of static files, from which your blog is served. It’s written in Go and it’s very fast.
Just in case if you get featured on Reddit, Slashdot or Hackernews, this might be the difference between your server failing under...
May 2, 2017
Auto-scaling a Docker Swarm
Setting up a Docker Swarm (“docker swarm mode” if you want to be more accurate), is pretty much a trivial process. You need 3 nodes, create a swarm on one of them and join the other two nodes to the swarm. Simple. What if you wanted a 100 swarm nodes? How fast can you provision new nodes to scale up your Docker Swarm?
Budget friendlyMaybe you’re well funded, have lots of income and can afford running auto-scaling groups on AWS into tens, hundreds or even thousands of insta...
April 20, 2017
Managing configuration with Viper
Viper is a popular configuration library that’s designed with 12 factor applications in mind.
Viper is a complete configuration solution for go applications including 12 factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats. Viper can be thought of as a registry for all of your applications configuration needs.
Let’s use it to provide configuration for a typical application.
Viper is available on github under spf1...
April 10, 2017
MySQL tips for developers
Having more than a decade of experience with MySQL, there are a few tricks I picked up over the years that I believe should be in the arsenal of every developer who works with this database more than just superficially. I’m going to list a quick break-down of them from the top of my head.
Processing large amounts of dataThere are several tricks that make MySQL faster if you’re doing a lot of data processing. Depending on what your goals are, any of these might be useful for you....


