Microservices for Startups: An Interview with Mike Hu of LogDNA
Tags: microservices
Published: 2018-02-16 15:26:39

---
title: "Microservices for Startups: An Interview with Mike Hu of LogDNA"
published: True
description: Mike Hu of LogDNA discusses his experiences with microservices in an interview for the eBook Microservices for Startups.
tags: microservices 
---

<p><em>This interview&nbsp;was done for&nbsp;our <a href="https://buttercms.com/books/microservices-for-startups/">Microservices for Startups</a> ebook. Be sure to check it out for practical advice&nbsp;on microservices. Thanks to&nbsp;Mike for his time and input!</em></p>
<p><img src="https://cdn.buttercms.com/NS8Z9aX5QeF1zHLaUTDe" caption="false" class="butter-float-left">&nbsp;<br><em>Mike Hu is the Head of Engineering at <a href="https://logdna.com/">LogDNA</a>,&nbsp;a cloud-based log management system that allows engineering and devops to aggregate all system and application logs into one efficient platform.</em></p>
<p><strong>For context, how big is your engineering team? Are you using microservices and can you give a general overview of how you’re using them?</strong></p>
<p>We are at 7 engineers. Our infrastructure is segmented by function, with multiple redundancies at every layer structured such that there is never a single point of failure.</p>
<p><strong>Did you start with a monolith and later adopt Microservices? If not, did you start directly with microservices? Why?</strong></p>
<p>We started with a microservices model from the beginning, taking lessons from established companies and proven strategies for deployment. The product we build requires a high level of availability and the only way to achieve this from what we know is to ensure from the ground-up that there was no single point of failure, which in our world would simply translate to downtime.</p>
<p><strong>How did you approach the topic of microservices as a team, and&nbsp;</strong><strong>was there discussion on aligning around what a microservice is? </strong></p>
<p>We had the opportunity to begin everything with a very small team&nbsp;of two and there wasn't really any organizational need for us [to formally align on microservices]. Most of the discussions were impromptu discussions with a single goal in mind.</p>
<p><strong>How much freedom is there on technology choices? Did you all agree on sticking with one stack or is there flexibility to try new?</strong></p>
<p>We've experimented with different technologies both in previous pivots as well as during the building of our current product. We've tried to stick to things that we were familiar with unless there was a special need. It's always better to deal with the devil you know than the devil you don't.</p>
<p><strong>How do you determine service boundaries and what lessons have you learned around sizing services?</strong></p>
<p><br>Most of our service boundaries are split based on function; some of which are business (like a business process), some of which are technical (like one service per code repository). As an example, we have workers fanned out to various servers, each that perform a specific function, but all of which listen to a message queue for work. The intentions were to minimize impact due to bad code. From an engineering organization's perspective, as you make changes to the existing code-base, it is inevitable that you run into bugs which arguably is not really in your control, but you can certainly control how much of your infrastructure is impacted in case that does happen.</p>
<p><strong>How have microservices impacted your development process or your ops and deployment processes? </strong></p>
<p><br>I think the most impact is in automating the deployment process. There are many ways to achieve automation, we happen to have written our own Slackbot to handle deployments. The deployments can happen very quickly across all of our services, so it's important to ensure services can stop and start in a timely manner, otherwise it could mean that all of our services (that perform the same function) become inaccessible for a short period of time. We tackled this through two different means: one is to ensure our code is written to gracefully shut down and capable of spin-up within a set amount of time; two is to ensure the deployment automation performs rolling restarts of our services rather than restarting everything all at once.</p>
<p><strong>How have microservices impacted the way you approach testing?</strong> <br><br>The biggest gain is to actually be able to have two (or even more) different versions of code running within the same infrastructure. This allows for the ability to test new code changes in parallel to existing services. For example, we transitioned some pipelining services by first splitting the message queue into both a test cluster as well as our live cluster, which enabled us to perform data integrity checks before pushing out to the rest of the infrastructure.</p>
<p><strong>How have microservices impacted security and controlling access to data?</strong><br><br>This is probably the biggest headache in all honesty. We have to build a LOT of firewall rules to limit access between clusters/services. Thankfully there are deployment frameworks (like SaltStack) that helps to bake this into the management of the infrastructure. The biggest takeaway for us was to try to use tools that support some kind of auth mechanism, rather than control inbound and outbound firewall rules.</p>
<p><strong>Have you run into issues managing data consistency in a microservice architecture?</strong><br><br>Not really. We run a centralized Mongo DB which has it's own replication mechanisms to deal with data consistency.</p>
Web Components are the central concept of Micro Frontends: a new way to design complex front-end application similar to the Microservices architecture. Using microservices architecture, we can use  [Web Components to create micro applications](https://buttercms.com/blog/using-web-components-with-buttercms), each with a specific mission. Check out  [our post](https://buttercms.com/blog/using-web-components-with-buttercms) for more
<p><em>Thanks again to&nbsp;Mike for his time and input!&nbsp;This interview&nbsp;was done for&nbsp;our <a href="https://buttercms.com/books/microservices-for-startups/">Microservices for Startups</a> ebook. Be sure to check it out for practical advice&nbsp;on microservices.</em></p>
<p></p>