<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5003701650524272230</id><updated>2025-04-24T01:18:49.110-05:00</updated><category term="RabbitMQ"/><category term="ant"/><category term="oracle"/><category term="performance"/><category term="Applet"/><category term="ExtJS"/><category term="cloud"/><category term="tika"/><category term="CACHE_VERSION"/><category term="DWR"/><category term="Programmer"/><category term="java"/><category term="optimization"/><category term="selenium"/><category term="thumbnail"/><category term="windows7"/><category term="AJAX"/><category term="AMQP"/><category term="Aggregating"/><category term="Axis bank"/><category term="BDB Replication"/><category term="Bonds"/><category term="Brother printer"/><category term="Build"/><category term="CGLib"/><category term="CMYK"/><category term="CTRL + BREAK"/><category term="Exchange"/><category term="Executors"/><category term="IE"/><category term="ImageMagic"/><category term="Insurance"/><category term="JAWR"/><category term="JDK proxy"/><category term="JRE 1.6.0_19"/><category term="JSR311"/><category term="Java HttpServer"/><category term="Keyboard"/><category term="MFC490CW"/><category term="Office 2007"/><category term="OutOfMemory"/><category term="PIL"/><category term="Python"/><category term="Quartz Admin"/><category term="Queue"/><category term="REST"/><category term="SQL"/><category term="Silicon valley"/><category term="SmartClient"/><category term="Spring"/><category term="Stock market"/><category term="TM contention"/><category term="ThreadDump"/><category term="Tiff"/><category term="Time management"/><category term="Tuning. ThreadDump"/><category term="YSlow"/><category term="bean"/><category term="beginner"/><category term="being lazy"/><category term="compensation"/><category term="counter offer"/><category term="dual"/><category term="echo"/><category term="exec"/><category term="expired certificate"/><category term="grep"/><category term="hotkey plus"/><category term="htmleditor"/><category term="index"/><category term="interceptor"/><category term="jar"/><category term="job"/><category term="job security"/><category term="junit"/><category term="locator pattern"/><category term="lsof"/><category term="mimetype"/><category term="mod_ssl"/><category term="mysql"/><category term="newCachedThreadPool"/><category term="newFixedThreadPool"/><category term="opensource"/><category term="pattern matching"/><category term="paul graham"/><category term="prank"/><category term="proxy"/><category term="purge"/><category term="recession"/><category term="sabeer bhatia"/><category term="schema diff"/><category term="sign"/><category term="similar columns"/><category term="similar constraints"/><category term="slowness"/><category term="subeclipse"/><category term="timestamp"/><category term="tuning"/><category term="whitespace"/><title type='text'>Programming fun at startup</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>321</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-630905386481713339</id><published>2021-03-21T17:36:00.001-05:00</published><updated>2021-03-21T17:36:40.364-05:00</updated><title type='text'>Preparing for an interview after being employed 11 years at a startup</title><content type='html'>&lt;p&gt;I would say I didn&#39;t prepared a hell lot but&amp;nbsp; I did 2 hours in night every day and every weekend around 8 hours for 2-3 months.&lt;br /&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;I did 20-30 leetcode medium problems from this list https://leetcode.com/explore/interview/card/top-interview-questions-medium/.&amp;nbsp;&lt;/li&gt;&lt;li&gt;I watched the first 12 videos of &lt;a href=&quot;https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-videos/&quot;&gt;Lecture Videos | Introduction to Algorithms | Electrical Engineering and Computer Science | MIT OpenCourseWare&lt;/a&gt;&lt;/li&gt;&lt;li&gt;I did this course https://www.educative.io/courses/grokking-the-system-design-interview&lt;/li&gt;&lt;li&gt;I researched on topics from https://www.educative.io/courses/java-multithreading-for-senior-engineering-interviews and leetcode had around 10 multithreading questions so I did those&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I watched some 10-20 videos from this channel https://www.youtube.com/channel/UCn1XnDWhsLS5URXTi5wtFTA&amp;nbsp;
&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/630905386481713339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2021/03/preparing-for-interview-after-being.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/630905386481713339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/630905386481713339'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2021/03/preparing-for-interview-after-being.html' title='Preparing for an interview after being employed 11 years at a startup'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-3297546576664907928</id><published>2017-04-29T13:12:00.003-05:00</published><updated>2017-04-29T13:17:47.070-05:00</updated><title type='text'>Better Tools Happy Engineers</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&quot;The only thing constant in a Startup is Change&quot;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
If you aren&#39;t changing fast enough then order and complacency sets in which leads to mediocrity and you can soon become obsolete. We do biweekly releases
 and want to move to weekly and then daily releases. You can increase 
the release cadence, if you are able to automate most of the testing. 
But automation can&#39;t detect everything and things may break and the intent is to establish a culture of how can you prevent it but if you cant prevent it then how fast can diagnose and recover from it.&lt;br /&gt;
&lt;br /&gt;
For a long time I had been pushing hard for a working centralized logging and after almost an year of trying to scale the ELK framework finally our team has been able to put a fast centralized logging system that&#39;s ingesting Terabytes of log per minute from thousands of nodes in production. This weekend we deployed a major architecture change by creating swimlanes in our cloud by directing different types of traffic to different swimlane and we also added more capacity to our Memcached servers. I was training my lablab bean plants on this Saturday morning when I received a call from India Operations team and I was like this doesn&#39;t look good. The operations engineer told me there were 4-5 support tickets opened in last 4 hours and they were all related to the datacenter zones where we added the swimlanes. I am like this doesn&#39;t look good. Luckily in one of the escalation ticket I found a&amp;nbsp; distributed tracing identifier called RequestId and I quickly did a Kibana search and found that the request ran into 503 due to&lt;nosrv&gt; no server found at HAProxy. I took the String &quot;&lt;nosrv&gt;NOSRV&quot; and fired a Kibana query for last 12 hours and found a pattern that it was happening during the deployment and isn&#39;t happening anymore for last 4 hours. This relaxed me and I can then think critically as to what might have happened.&lt;/nosrv&gt;&lt;/nosrv&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyZlayePMRuH4dFyeAha6ZyUmcNo2MtCEeFmhppui8dvw7sNYJQjDLfirD0lVV-IsbEUHewP0PlUy8D071MHjvZJWpSzn7g5ru2QeiqNWUR-n9-smvac-axbdMP-Pg700XdfhZe0po_Z4/s1600/nosrv.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;115&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyZlayePMRuH4dFyeAha6ZyUmcNo2MtCEeFmhppui8dvw7sNYJQjDLfirD0lVV-IsbEUHewP0PlUy8D071MHjvZJWpSzn7g5ru2QeiqNWUR-n9-smvac-axbdMP-Pg700XdfhZe0po_Z4/s640/nosrv.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I did some more queries and root caused it and send it to deployment team and also confirmed that for the customers things are working fine. We would do a postmortem to takes steps so it doesn&#39;t happen again. Thanks to a working centralized logging solution I was able to ROOT cause it end to end within 20 minutes and I was back to my gardening.&lt;br /&gt;
&lt;br /&gt;
Previous weekend was also similar things happened where I had to take my son to a birthday party and a customer was complaining that his account is being locked out due to Invalid Auth attempts for 3 weeks and no one is able to chase which device it is and he escalated to top management. The customer ticket was in Ashville data centre and everyone was checking there but in one of the email exchange customer told me his Active Directory account is getting lot of invalid attempts from&amp;nbsp; San jose data centre. I was baffled if its a security issue but I was like what the heck I can just query his email &quot;xxx@xxx.xom&quot; in the San Jose centralized kibana and indeed he was right. He had one more account in San Jose data centre where an old device from one of his office was making the calls. I sent customer initial details and I took my son to birthday party and came back and root caused the issue within 1 hour all due to centralized logging and I was back to enjoy working on things I love.&lt;br /&gt;
&lt;br /&gt;
I am lazy by nature and I hate doing mundane tasks like grepping logs, for a long time I was pushing team to get centralized logging working. The problems with grepping logs were:-&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;New machines were added but the log mounts weren&#39;t&amp;nbsp; there so I had to chase people to mount them in middle of debugging session which can sometime takes hours on a weekend.&lt;/li&gt;
&lt;li&gt;Mounts would become&amp;nbsp; bad.&lt;/li&gt;
&lt;li&gt;Grepping logs for simple things take hours if done over a day worth of logs over 200 machines.&lt;/li&gt;
&lt;li&gt;You need to understand the entire architecture of all 20-30 services and 3-4 layers of load balancers to grep in a localized area to save time.&lt;/li&gt;
&lt;li&gt;&quot;The only thing constant in a Startup is change&quot; and architecture changes every month so you need to keep up to speed in all of them.&lt;/li&gt;
&lt;li&gt;Support or customer success team doesn&#39;t know architecture and then ticket is given to engineers who isn&#39;t happy to chase issues sometimes only to explain customer that its a feature not a bug.&lt;/li&gt;
&lt;li&gt;Product management team also doesn&#39;t know architecture enough to grep things.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;With Grepping you cant see trends like above unless you are techy enough in linux to do graph on command lines.&lt;/li&gt;
&lt;/ol&gt;
Centralized logging solves all of this and best of all you can send a link to the issue or even put it in ticketing system.&lt;br /&gt;
&lt;br /&gt;
Providing better tools and pushing hard for them should be the job of Engineering leads as the technology landscape keeps changing rapidly and whoever can move fast and recover from failures quickly will survive. Also better tools create Happy engineers as they can do mundane things quickly and move back to doing what they love (in my case programming, gardening and spending time with family).</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/3297546576664907928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2017/04/better-tools-happy-engineers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/3297546576664907928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/3297546576664907928'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2017/04/better-tools-happy-engineers.html' title='Better Tools Happy Engineers'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyZlayePMRuH4dFyeAha6ZyUmcNo2MtCEeFmhppui8dvw7sNYJQjDLfirD0lVV-IsbEUHewP0PlUy8D071MHjvZJWpSzn7g5ru2QeiqNWUR-n9-smvac-axbdMP-Pg700XdfhZe0po_Z4/s72-c/nosrv.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-7824362332980321015</id><published>2017-01-31T16:01:00.001-06:00</published><updated>2017-01-31T16:01:44.267-06:00</updated><title type='text'>Learning from mistakes</title><content type='html'>We should not repeat mistakes and if its the end user that is 
committing same mistake again and again then the UX should be changed to
 make it difficult for user to perform such actions. Make the user apply
 some cognitive thinking before he can do a detrimental action and make 
the action obscure.&lt;br /&gt;
&lt;br /&gt;
For e.g. we are a filesystem 
company and &quot;Trash delete&quot; is a detrimental action, over past few years I
 had several tickets where user accidentally clicked Empty trash and 
deleted all his files or he clicked Delete Permanently instead of 
Restore. He was able to do all this&amp;nbsp; because in the UX the actions are 
close to each other&lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;&quot; src=&quot;data:image/png;base64,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&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;&quot; src=&quot;data:image/png;base64,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&quot; /&gt; &lt;br /&gt;
&lt;br /&gt;
There
 are users who did this and immediately created tickets under panic and 
some even blaming that system did delete instead of restore.&amp;nbsp; I know in 
UI it may look bad but I have seen several companies solving this by 
making user think twice before invoking detrimental action like asking a
 captcha or make the delete and restore flow different like send him an 
email with confirmation like before he can do Empty trash.&lt;br /&gt;
&lt;br /&gt;
An
 easier thing would be to just move the actions far apart and put some 
filler actions between them and change color of action buttons, like 
make it dumb for user to know which he is clicking.</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/7824362332980321015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2017/01/learning-from-mistakes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/7824362332980321015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/7824362332980321015'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2017/01/learning-from-mistakes.html' title='Learning from mistakes'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-6070207986170031650</id><published>2016-12-18T10:56:00.003-06:00</published><updated>2016-12-18T10:58:09.922-06:00</updated><title type='text'>History remembers finishers</title><content type='html'>This week I saw the movie &lt;a href=&quot;https://www.youtube.com/watch?v=x_7YlGv9u1g&quot;&gt;Dangal&lt;/a&gt; trailer and the actor says &quot;If you win silver medal, today or tomorrow people will forget you but if you win Gold medal you will become a source of inspiration&quot;.&amp;nbsp; Also today morning I saw K L Rahul got out on 199 runs and the commentators are complaining about his loss of focus on one ball and he got out &lt;a href=&quot;http://timesofindia.indiatimes.com/sports/cricket/news/india-v-england-5th-test-day-3-rahuls-199-drives-india-to-commanding-position/articleshow/56045818.cms&quot;&gt;http://timesofindia.indiatimes.com/sports/cricket/news/india-v-england-5th-test-day-3-rahuls-199-drives-india-to-commanding-position/articleshow/56045818.cms&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This reminds me of Startups and Finishers, give up too close to the finish line and you wont be remembered but if you finish it you may become an inspiration.</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/6070207986170031650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2016/12/history-remembers-finishers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6070207986170031650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6070207986170031650'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2016/12/history-remembers-finishers.html' title='History remembers finishers'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-5177682094414963331</id><published>2016-12-16T19:11:00.001-06:00</published><updated>2016-12-17T12:23:44.008-06:00</updated><title type='text'>Avoiding Burnout</title><content type='html'>Burnout is very common in startup and it hits you more often when you are at the same startup for 7+ years. Much of burnout is felt when you are working hard but progress is slow and you have high expectations of yourself and the team. I read this excellent article &lt;a href=&quot;http://andrewdumont.me/avoiding-burnout/&quot;&gt;http://andrewdumont.me/avoiding-burnout/&lt;/a&gt; and it felt almost Deja vu to me.&amp;nbsp; I work from home so it hits even hard to me as I have less people to share it with. Here are the ways I have been trying to curtail burnout and hope it help others too:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Workplace&lt;/b&gt;:Keep your workplace organized and stick to a routine.&amp;nbsp; I have an office room at home and I am in work mode when I am in that office.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Morning&lt;/b&gt;:Keep 1 hour in mornings on something outside work. I read a lot in morning and don&#39;t come online or check emails until that 1 hour is done.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Workout&lt;/b&gt;: rain, heat or winter, I try to walk for 30 min in afternoon as much as possible. This gives you some time for meta thinking and de stresses you from the morning chaos. Many solutions to tough problems come on this walk. I don’t hear music or podcast on this, I tried but then it felt like more work, I avoid it.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Silence room&lt;/b&gt;:Do some grunt work on weekends, be it doing vaccum in house or mowing your lawn, you need 1-2 hours of &quot;Your own time&quot; withot distractions.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Email&lt;/b&gt;: fight this monster, I sent most notifications to trash and assume people will call me if they need me. Also when startup becomes big people will copy you on tons of emails so choose which battles are worth fighting and which aren’t.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Hipchat&lt;/b&gt;: Avoid this also if you are on creator schedule, I am now a days trying to stick to checking it only if I am waiting for build to finish or have some time before meetings.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Motivation&lt;/b&gt;: Set some tough projects for you and work on them. Even if you are making slow progress you should finish it by making some progress every week.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Coding&lt;/b&gt;: I like coding so now I have reserved calendar time of 3 hours a day to it.&amp;nbsp; This is by far the best way for avoiding burnout for me.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Buddy&lt;/b&gt;: Have a buddy who you can share some things, may be you will just vent out and he will also but it would de stress you.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Vacations&lt;/b&gt;: I try to take 1 big vacation(2weeks)&amp;nbsp; every year and try to go to national parks for camping where there is no connectivity so you are really unplugged.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;HQ visit&lt;/b&gt;: this recharges me as I again get some more brainstorming on things outside my purview.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Hobby&lt;/b&gt;: I recently picked up photography and I do read and practice that.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Humans&lt;/b&gt;: I feel more burnout when I need to make something live and there are many humans in the process chain that makes things slow, things that should take 1 week takes months and then you are burned out as your baby isn’t live.&amp;nbsp; I try to automate and avoid humans in the process as much as possible. Its unavoidable but if you are lazy and think hard then its doable in many cases. &lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/5177682094414963331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2016/12/avoiding-burnout.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/5177682094414963331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/5177682094414963331'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2016/12/avoiding-burnout.html' title='Avoiding Burnout'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-6427814254768661613</id><published>2016-09-15T17:58:00.003-05:00</published><updated>2016-09-15T17:58:35.112-05:00</updated><title type='text'>Finishing what you started</title><content type='html'>A quality of a good Startup engineer is &quot;Finishing what you started&quot;. I value finishers more than people who talk good theory and start many things but don’t finish most of them. Most of the time people get excited and start many things concurrently but leave them in limbo or they finish 95% of the thing.&amp;nbsp; Over 7 years at my current Startup I have observed that in many projects doing first 95% may take you X units of time but its the remaining 5% that demands 10x cognitive effort and time from you. Its this last 5% where people either burnout or give up. Its the finishers who keep the compass pointing to North star, never give up and do what ever it takes to Finish( in indian mythology saam, daam, dand, bhed).&lt;br /&gt;
&lt;br /&gt;
Recently One of my respected colleague &quot;Sachin&quot; left for a sabbatical. He was one of the Finishers whom I would hire any day on my team or would choose as a buddy to watch your back.&amp;nbsp; &quot;Sachin&quot; has a zeal like a Rhino or Triceratops to Finish what he started and for this I value him the most.&amp;nbsp; Best of luck to him and I hope he gets bored with sabbatical and joins back :).</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/6427814254768661613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2016/09/finishing-what-you-started.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6427814254768661613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6427814254768661613'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2016/09/finishing-what-you-started.html' title='Finishing what you started'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-1415235761126681556</id><published>2016-09-03T17:34:00.002-05:00</published><updated>2016-09-03T17:37:21.445-05:00</updated><title type='text'>What a rocky start to labor day weekend</title><content type='html'>Woke up by earthquake at 7:00 AM in morning and then couldn&#39;t get to sleep. I took a bath, made my tea and started checking emails and saw that after last night deployment three storage node out of 100s of nodes were running into Full GC. What was special about the 3 nodes was that each one was in a different Data centre but it was named same app02.&amp;nbsp; This got me curious I asked the node to be taken out of rotation and take a heap dump.&amp;nbsp; Yesterday night a new release has happened and I had upgraded spymemcached library version as new relic now natively supports instrumentation on it so it was a suspect. And the hunch was a bullseye, the heap dump clearly showed it taking 1.3G and full GCs were taking 6 sec but not claiming anything.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJs01Ob9-zDOzfhE-ky_15RJCL2_4oIkukS5F9lIayzuW3SHFJDqyrRc2dhiDd4WrtCMzImNr8kb2qES_11k7FgriyoGHef6x5Nw8Y1wA8EjYc2Ovv1V_0lypaYEXcbW9zEPyH8B9SGGY/s1600/memcached2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJs01Ob9-zDOzfhE-ky_15RJCL2_4oIkukS5F9lIayzuW3SHFJDqyrRc2dhiDd4WrtCMzImNr8kb2qES_11k7FgriyoGHef6x5Nw8Y1wA8EjYc2Ovv1V_0lypaYEXcbW9zEPyH8B9SGGY/s400/memcached2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ7eAvl7ICQKDBnjUE0yoo5jdki7cAVZavEh-7Dsidg8Gr7txLbXQdDoqvZKLL6K8Ui93r_qxdV76VqVOyELjlW2wglutFEx2x381ZZTWfa65_mwe5U-JHsRJKPty4NJx9A8Fpt3pbmOE/s1600/memcached.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ7eAvl7ICQKDBnjUE0yoo5jdki7cAVZavEh-7Dsidg8Gr7txLbXQdDoqvZKLL6K8Ui93r_qxdV76VqVOyELjlW2wglutFEx2x381ZZTWfa65_mwe5U-JHsRJKPty4NJx9A8Fpt3pbmOE/s400/memcached.png&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
I have a quartz job in each jvm that takes a thread dump every 5 minutes and saves last 300 of them, checking few of them quickly showed a common thread among all 3 data centres. It seems there was a long running job that was trying to replicate pending storage objects as per replication policy and it had 50M or so backlog to catchup.&amp;nbsp; It seems newrelic was holding on to all that data for the thread and not just collecting the aggregate stats, the job was running for hours causing memory to increase with each replicated file.&lt;br /&gt;
&lt;span id=&quot;goog_1912106367&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1912106368&quot;&gt;&lt;/span&gt;&lt;br /&gt;
Now I had two options:-&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Rollback the library&lt;/li&gt;
&lt;li&gt;Suppress newrelic instrumentation&lt;/li&gt;
&lt;/ol&gt;
I thought of going option#2 as it wont require any new build, just run puppet and restart all nodes.&amp;nbsp; Boy I was wrong , newrelic has negligible documentation for the yml file.&amp;nbsp; I filed a support ticket as they have no phone support even for emergencies even though we pay thousands of dollars a month. After IPO their support team quality has also reduced, the support told me hey go and disable the class, i am like its natively supported by you so give me some hints how to do it. She told me that a OOM ticket is filed 2 versions ago so I can wait for it to be fixed, wtf. I waited 20 min for her to tell me how to disable it and no reply,&amp;nbsp;  It seems even she didnt knew how to do it so she was buying time letting me hanging dry on a cloth line. I started mining the support forum and google and I tried 5-10 settings with our devops engineer and newrelic agent is stupid that it would take any wrong setting too and show it in the UI. I ended up with a settings nightmare&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpSYmpgsz8f7M3Mzq66Dbjg64fK1QVfVXqVUgE6TeZiHLhqfPICF-LCRzW1e8Q4HOcVY6cpBvtxax3MbBAmVCwB5lT_iELsKD0M7dlidjhZZPZkDZXnpLjUP7SYHZAT-DYKh16zSkXZdo/s1600/settings.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;102&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpSYmpgsz8f7M3Mzq66Dbjg64fK1QVfVXqVUgE6TeZiHLhqfPICF-LCRzW1e8Q4HOcVY6cpBvtxax3MbBAmVCwB5lT_iELsKD0M7dlidjhZZPZkDZXnpLjUP7SYHZAT-DYKh16zSkXZdo/s400/settings.png&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Finally I tried one setting which was weird but worked, I had updated library to spymemcached-2.12.1 but the setting to turn it off in newrelic was&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&amp;nbsp; class_transformer:&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; com.newrelic.instrumentation.spymemcached&lt;b&gt;-2.12.0&lt;/b&gt;:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enabled: false&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
notice the setting is called 2.12.0 even though my library is 2.12.1, wtf.&amp;nbsp; It was late in night for the devops engineer and I was almost 5 hours on the desk, we just patched those 3 special nodes and called it a day. The other nodes would be patched by puppet before Monday using automation.&amp;nbsp; &lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Today I also complete 7&amp;nbsp; years at the company :).&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/1415235761126681556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2016/09/what-rocky-start-to-labor-day-weekend.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/1415235761126681556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/1415235761126681556'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2016/09/what-rocky-start-to-labor-day-weekend.html' title='What a rocky start to labor day weekend'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJs01Ob9-zDOzfhE-ky_15RJCL2_4oIkukS5F9lIayzuW3SHFJDqyrRc2dhiDd4WrtCMzImNr8kb2qES_11k7FgriyoGHef6x5Nw8Y1wA8EjYc2Ovv1V_0lypaYEXcbW9zEPyH8B9SGGY/s72-c/memcached2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-6943007593960283933</id><published>2016-09-01T17:30:00.001-05:00</published><updated>2016-09-01T17:37:58.032-05:00</updated><title type='text'>Hanging on to old things</title><content type='html'>I have seen my Kid grow from 0 to 6 year and one startup growing from 20 to 150 employees and another growing from 5 to 300+ employees.&amp;nbsp; A common trend I seen is hanging on to old things.&amp;nbsp; Not sure if its due to sentimental value attached to things or inability to make hard choices.&amp;nbsp; My Kid still has his toys that he used to play when he was 1 year old. He wouldn’t let us throw them or give it to someone, I am recently working with him to let go of old things.&amp;nbsp; Problem with old things is that they are a drag, they just sit around the house and are a clutter. Its the same with old books, I have many of them and one day I need to go and clean them once I read a book,&amp;nbsp; I rarely read them again so why not donate them to library.&lt;br /&gt;
&lt;br /&gt;
A common observation with Startups I have worked is feature bloat due to holding on to old features. Features that are not maintained but are in use by a handful of customers causes drag. Recently I wanted to refactor folder listing code to not load additional versions data as the new UI doesn’t require it. But as I started chasing reference graph I found 5-10 places in old versions of UI using it with some complex intertwined data structures and what seemed like 1 hour worth of work seemed like 1 week of work. I gave up refactoring it due to other important things on plate. Ultimately biggest loser in this is the new UI. &lt;br /&gt;
&lt;br /&gt;
Sometimes we have to make tough decisions and let go of older things else it creates a baggage not only to us but others too.</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/6943007593960283933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2016/09/hanging-on-to-old-things.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6943007593960283933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6943007593960283933'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2016/09/hanging-on-to-old-things.html' title='Hanging on to old things'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-6141737608096293076</id><published>2016-06-21T20:06:00.001-05:00</published><updated>2016-06-21T20:06:07.002-05:00</updated><title type='text'>Little things and frustrations</title><content type='html'>Small shitty things frustrates me, like someone came up with an idea 
to put epic on each Jira task.&amp;nbsp; Well its suited for big Tasks that has 
lot of subtasks but 50% + of my cases don’t require an Epic.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT3bO7u9SEXrdVB5Ainhp0bvGyUSoDvK_IBuiE7kKirKR5BSnfiVISxoSpNpS7OA9Inr6dVkFrJKvoGqF5nNj228mRjCT2Rb4596sdCH-OzIeVotRasz9e-pax8NzlgBwjteSaGlxXXOs/s1600/shitty+things.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;118&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT3bO7u9SEXrdVB5Ainhp0bvGyUSoDvK_IBuiE7kKirKR5BSnfiVISxoSpNpS7OA9Inr6dVkFrJKvoGqF5nNj228mRjCT2Rb4596sdCH-OzIeVotRasz9e-pax8NzlgBwjteSaGlxXXOs/s640/shitty+things.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I
 am lazy and dont like to waste my time. I am creating an issue and 
filled all things and now this process requires me an Epic, total BS.&amp;nbsp; 
Yes this is total BS so either the process requires fixing where epic is
 first required field so I wont invest filling so many fields or this 
needs to be removed/made optional.</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/6141737608096293076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2016/06/little-things-and-frustrations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6141737608096293076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6141737608096293076'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2016/06/little-things-and-frustrations.html' title='Little things and frustrations'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT3bO7u9SEXrdVB5Ainhp0bvGyUSoDvK_IBuiE7kKirKR5BSnfiVISxoSpNpS7OA9Inr6dVkFrJKvoGqF5nNj228mRjCT2Rb4596sdCH-OzIeVotRasz9e-pax8NzlgBwjteSaGlxXXOs/s72-c/shitty+things.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-6735405879897973612</id><published>2015-07-15T17:16:00.003-05:00</published><updated>2015-07-23T17:36:08.222-05:00</updated><title type='text'>Data motivates you to do more</title><content type='html'>I always believed in &quot;Trusting data&quot; over human gut but lately I have
 been observing a simple fact that being data driven has a side effect, &quot;it motivates you and&amp;nbsp; keeps you on track&quot;. Some recent examples are:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Fitbit:&lt;/b&gt; Last year I started the afternoon walk because by 2:00PM after doing calls and replying to a lot of emails the brain would be fried and I wont have energy left to code or think.&amp;nbsp; Doing these 30 min walk daily recharges the brain. I&amp;nbsp; had an Omron pedometer sitting around for almost an year and I seldom took it with me on walks. The problem with it was that it used to store last 30 days data of my steps and other things but it didn’t had a good way to graphically see the data. When it comes to data &quot;less is more&quot; but also one more important aspect is that you need to present your data in graphs so it doesn’t take a huge amount of cognitive effort to make sense of it.&amp;nbsp; Recently my employer gave a fitbit to everyone who participated in summer challenge and it isn’t a better&amp;nbsp; pedometer than my old Omron but immediately I saw that it can sync data stored on pedometer via bluetooth to my fitbit app and after a week I see this. Immediately in 1 sec I can see that I am lagging this week and need to catch up.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0cN6wBUKUP2Fid4Sg-HzZrF4RKHfoEEAKvFzah2IJiM6bYO5W-pGwxc74ij1B1gPVuoy6HgvcQNfYjKAKg1f2nG7yW-TStMSzSjy8GAwXG2wC506cNp7gn8WKui_YxoK8PykkMHiyi7I/s1600/IMG_1357.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0cN6wBUKUP2Fid4Sg-HzZrF4RKHfoEEAKvFzah2IJiM6bYO5W-pGwxc74ij1B1gPVuoy6HgvcQNfYjKAKg1f2nG7yW-TStMSzSjy8GAwXG2wC506cNp7gn8WKui_YxoK8PykkMHiyi7I/s320/IMG_1357.PNG&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Its another thing that I need to remember to carry this dongle with me, I always carry my cell with me on walk and I saw that Iphone6 has a pedometer built into it so that would eliminate the need for this when I upgrade to Iphone6. &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY4I-Nmogtaea1z_Ami1Ft7aZuT8gVOsVrYIpxsAdgH7sU6CLc37Ynx0QXxvgGpCWnCQRVMX4wVCVwjOKE0a2mMsB-stWrm_wxQC7NN9DPnzM9m1jG3zsufjfP1hUeZyyJPLMDj9eKids/s1600/zip.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY4I-Nmogtaea1z_Ami1Ft7aZuT8gVOsVrYIpxsAdgH7sU6CLc37Ynx0QXxvgGpCWnCQRVMX4wVCVwjOKE0a2mMsB-stWrm_wxQC7NN9DPnzM9m1jG3zsufjfP1hUeZyyJPLMDj9eKids/s1600/zip.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Large scale &lt;/b&gt;&lt;b&gt;&lt;b&gt;migration&lt;/b&gt; to Elasticsearch: &lt;/b&gt;We recently migrated billions of files to Elasticsearch and the migration took months but data kept us on toes and telling us if the compass is pointing towards north or not. We built various dashboard to monitor migration rates and as migration was running day and night I would start my day with checking how many more files we migrated and whether we need to add more servers, jvms, memory or CPU to meet the goal. Here is a graph in one data center.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHqtcfn5pCW2EJ_fjur7qXA-CbNWVOyDlTU1Gqbzu_pDKuPxIBhodr7RoHEwcrRpCD6Ua3SEsuYV6ypjmq1BDFeAigQGXyRayi8_pm6K5-mjha2YedlfODw9etZCCy5jPe9csAfgnjjqQ/s1600/migration.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHqtcfn5pCW2EJ_fjur7qXA-CbNWVOyDlTU1Gqbzu_pDKuPxIBhodr7RoHEwcrRpCD6Ua3SEsuYV6ypjmq1BDFeAigQGXyRayi8_pm6K5-mjha2YedlfODw9etZCCy5jPe9csAfgnjjqQ/s1600/migration.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Data kept us on track and we were able to spot many issues before they were able to create a disaster.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Exception Analysis&lt;/b&gt;:&amp;nbsp; We do exceptions and 5xx status analysis on incoming requests daily and in 2 week sprint we strive to fix&amp;nbsp; as many as we can, but after the release either new issues pops up or customers use the flow in a different way causing some components to buckle under pressure but one thing that has kept us on toes is data. By looking at the one screen report we can tell how did this data center do yesterday and which areas require immediate attention vs areas that require attention in 1-2 days. This leads to lesser no of customer escalations as we are able to spot many issues before them. Little little things adds up and&amp;nbsp; having this report daily strives us to optimize more and we can spend quality time on doing things we love which is writing code for scalable systems.&lt;br /&gt;
&lt;br /&gt;
In short data points you that there is a problem and once a bug has been implanted in your brain that a problem exists you would try to fix it so you can get back to normal routine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/6735405879897973612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2015/07/data-motivates-you-to-do-more.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6735405879897973612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6735405879897973612'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2015/07/data-motivates-you-to-do-more.html' title='Data motivates you to do more'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0cN6wBUKUP2Fid4Sg-HzZrF4RKHfoEEAKvFzah2IJiM6bYO5W-pGwxc74ij1B1gPVuoy6HgvcQNfYjKAKg1f2nG7yW-TStMSzSjy8GAwXG2wC506cNp7gn8WKui_YxoK8PykkMHiyi7I/s72-c/IMG_1357.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-7243541374609660015</id><published>2015-05-06T16:54:00.001-05:00</published><updated>2015-05-06T17:33:38.521-05:00</updated><title type='text'>Have I started hating mysql and falling in love with distributed databases</title><content type='html'>It seems Mysql is rock solid if you want:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Transactions&lt;/li&gt;
&lt;li&gt;ACID support &lt;/li&gt;
&lt;/ol&gt;
So
 I would still recommend mysql for any thing that is mission critical 
data and it should be the primary datastore for your transactions. But what about 
derived data, immutable data or analytical data?&lt;br /&gt;
&lt;br /&gt;
In past I have built large scale 
cluster of mysql server storing metadata about billions of files and 
folders used by tens of thousands of customers daily and its scaling 
fine and 
working good, its still growing at a healthy rate and holding up.&amp;nbsp; But 
this requires a lot of baby sitting if you have 100s of nodes and you 
need to do&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;replication&lt;/li&gt;
&lt;li&gt;add more nodes&lt;/li&gt;
&lt;li&gt;rebalancing data&lt;/li&gt;
&lt;li&gt;monitoring entire cluster&lt;/li&gt;
&lt;li&gt;Sharding&lt;/li&gt;
&lt;li&gt;Backup/restore&lt;/li&gt;
&lt;/ol&gt;
You
 have to write a lot of tooling and lot of monitoring/babysitting to 
scale the cluster. Plain stock Mysql will scale up to a limit but 
vertically scaling has its own issues. So +1 for Mysql but not 
everything should be stuffed there. &lt;br /&gt;
&lt;br /&gt;
Recently me 
and my team built full text search/indexing on same dataset using elasticsearch
 and so far it hasn’t disappointed me. With just 1 engineer and
 1 devops guy we are able to build a cluster per datacenter to 
store same data. The thing I liked most about Elasticsearch was half 
way through migration we started facing performance issues and we just 
added more nodes and the cluster rebalanced itself.&amp;nbsp; Also Elasticsearch
 has tools like kopf/HQ where I can monitor all nodes in one place.&amp;nbsp; 
For e.g. this is one of the smallest cluster that we just started migrating and as it grows if we see high load averages then we can add more data or client nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg21JZ7cloTDBPg5ZVnHBF7K3tcCs003rywbxd5AbpxyzIgbpuB7o3ELgqGyZ8ov5LOUINgmS4GM_gBZLPPsRsi714j2jy5ci9miqBJMOp7rSuZv2SOlJYyvRncZUKzyw939I9PERVw4rE/s1600/elastic_search.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg21JZ7cloTDBPg5ZVnHBF7K3tcCs003rywbxd5AbpxyzIgbpuB7o3ELgqGyZ8ov5LOUINgmS4GM_gBZLPPsRsi714j2jy5ci9miqBJMOp7rSuZv2SOlJYyvRncZUKzyw939I9PERVw4rE/s1600/elastic_search.png&quot; height=&quot;231&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I don’t need an lot of DBAs to manage the cluster as elasticsearch has built in support for&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;replication&lt;/li&gt;
&lt;li&gt;adding more nodes&lt;/li&gt;
&lt;li&gt;rebalancing data&lt;/li&gt;
&lt;li&gt;monitoring entire cluster&lt;/li&gt;
&lt;li&gt;Sharding&lt;/li&gt;
&lt;/ol&gt;
I
 had earlier built an event store to store events on top of mysql but I 
was storing only few months of events into it. Now I have to build a 
store that can store events for 7 years and I dont want to use Mysql for
 it as I dont want to baby sit it. Our events data is way huge than 
the metadata. Because every change to a file generates an event and over
 7 years this could be a huge no of records. I dont want to manage an 
army of mysql servers so researching for some database that has good 
querying support and can store long lived data with eventual consistency
 and rock solid durability. You could store them using kafka or scribe but they lack good querying support.&amp;nbsp; I am still not sure if Elasticsearch is a good store for this because I don’t need search, I need querying based on some paths and time based querying. Also most querying will be on recent data and past data would be queried rarely. Logstash uses Elasticsearch in same fashion so I need to find something else and then compare with Elasticsearch.&lt;br /&gt;
&lt;br /&gt;
Also I see a trend emerging that in today&#39;s world DBAs need to get out of cocoon and know more than just relational databases. There are a lot of new tools like OpenTSDB, HBase, Mongo, Cassandra, ElasticSearch, BigQuery that are now getting used to store BigData so they need to catch up and catch up fast. Google recently released BigTable &lt;a href=&quot;http://venturebeat.com/2015/05/06/google-introduces-cloud-bigtable-managed-nosql-database-to-process-data-at-scale/&quot;&gt;http://venturebeat.com/2015/05/06/google-introduces-cloud-bigtable-managed-nosql-database-to-process-data-at-scale/&lt;/a&gt; need to check it out. I had checked BigQuery but writes are cheap, its the reads that are costly when using things like BigQuery.</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/7243541374609660015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2015/05/have-i-started-hating-mysql-and-falling_6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/7243541374609660015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/7243541374609660015'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2015/05/have-i-started-hating-mysql-and-falling_6.html' title='Have I started hating mysql and falling in love with distributed databases'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg21JZ7cloTDBPg5ZVnHBF7K3tcCs003rywbxd5AbpxyzIgbpuB7o3ELgqGyZ8ov5LOUINgmS4GM_gBZLPPsRsi714j2jy5ci9miqBJMOp7rSuZv2SOlJYyvRncZUKzyw939I9PERVw4rE/s72-c/elastic_search.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-8485651865154138139</id><published>2015-05-06T16:00:00.004-05:00</published><updated>2015-05-06T16:00:49.108-05:00</updated><title type='text'>Rate limiting APIs and Java services when operating at Scale to solve Thundering herd problem</title><content type='html'>When you are operating at scale and handling peak traffic of 1K+ request per sec on a jvm then no matter what you do you would get hit by a Thundering herd problem. There would be operations that happens once in a while but take more than 10 sec and if there are too many of them happening then you could choke backend services or worse cause a downtime. So you need to Rate limit these long running operations that only X can run at a time, this way you are leaving room for running lots of short lived transactions.&lt;br /&gt;
&lt;br /&gt;
When you have millions of users then not all users are doing these long running operations and not all traffic is coming from online users. We are a cloud storage company and we give sync client to users so 80%+ traffic at a given time is coming from these clients that are trying to sync changes between cloud and local system behind the scenes.&amp;nbsp; Our application is written using REST apis and these clients&amp;nbsp; are using the same REST apis that our web ui is using.&amp;nbsp; Also some customers may have 10K users and some may have 10. So it may happen that a big customer may always starve the small customers.&amp;nbsp; So you need two things:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Fair distribution of use of REST apis&lt;/li&gt;
&lt;li&gt;Separate priority for online vs bot traffic.&lt;/li&gt;
&lt;li&gt;Rate limit or protect a tier if a Thundering herd occurs&lt;/li&gt;
&lt;/ol&gt;
Most of these sync clients can exponential backoff, they handle 503 response and retry after some time with exponential delay with an upper threshold.&lt;br /&gt;
&lt;br /&gt;
For fair distribution of use among customers I was using a pool of thread pools with hashing based on customerId and a salt, the technique is described here &lt;a href=&quot;http://neopatel.blogspot.com/2013/06/java-fair-share-threadpool.html&quot;&gt;http://neopatel.blogspot.com/2013/06/java-fair-share-threadpool.html&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
for Rate limiting I was using ThreadPools. When requests would come I would create a callable for the action to be executed and submit it to threadpool and wait for the result. The Thread pool had a fixed processing capacity and a fixed queue length. After the queue is full we would send 503s.&lt;br /&gt;
&lt;br /&gt;
But thread pools have many disadvantages:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;You already have a http thread and now that is idle as you delegated to a threadpool to do the job.&lt;/li&gt;
&lt;li&gt;New relic somehow goes nuts when you delegate to a threadpool and doesnt record any trace info, AppDynamics is smart and it recognizes it but I am not a big fan of AppDynamics.&lt;/li&gt;
&lt;li&gt;Logging context gets messed up and you now have to propagate it to the new thread.&lt;/li&gt;
&lt;li&gt;Exception handling is messed up as it would get wrapped in ExecutorService exceptions&lt;/li&gt;
&lt;li&gt;Under high load we ran into an issue where in tomcat if you wrote to response from 2 threads and sync clients abort a connection then it hangs the thread causing all threads to be gobbled up in a course of 6-12 hours.&lt;/li&gt;
&lt;/ol&gt;
I was looking for a RateLimiter that would give me a gate with a finite opening and a finite queue length, kinda like restaurant where you have a finite no of tables and a finite queue before they start accepting more guests. I didnt found anything so I cooked up a one in kitchen.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The code is going live this weekend, we did perf test and the results looks promising. To be conservative I had to add a switch so that in case of issues you can revert to old way with the flip of a flag in config at runtime.&lt;br /&gt;
&lt;br /&gt;
public class RateLimiter&lt;t&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Getter(AccessLevel.PACKAGE)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private DiagnosticSemaphore allQueue;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Getter(AccessLevel.PACKAGE)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private DiagnosticSemaphore processingQueue;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private volatile boolean shutdown;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public RateLimiter(int numProcessing, int numWaiting) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.allQueue = new DiagnosticSemaphore(numWaiting + numProcessing, true);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.processingQueue = new DiagnosticSemaphore(numProcessing, true);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public T executeWithRateLimit(Callable&lt;t&gt; callable) throws Exception {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handleShutdown();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean allQueueAdded = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean processingQueueAdded = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allQueueAdded = allQueue.tryAcquire();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!allQueueAdded) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new RejectedExecutionException();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processingQueue.acquire();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processingQueueAdded = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handleShutdown();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return callable.call();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (InterruptedException e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new ApplicationRuntimeException(e);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } finally {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (processingQueueAdded) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processingQueue.release();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } finally {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (allQueueAdded) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allQueue.release();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void handleShutdown() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (shutdown) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new RejectedExecutionException(&quot;Not accepting requests as shutting down&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void shutdownNow() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shutdown = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (Thread t : allQueue.getQueuedThreads()) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t.interrupt();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static final class DiagnosticSemaphore extends Semaphore {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static final long serialVersionUID = 1L;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DiagnosticSemaphore(int permits, boolean fair) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super(permits, fair);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Collection&lt;thread&gt; getQueuedThreads() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return super.getQueuedThreads();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/thread&gt;&lt;/t&gt;&lt;/t&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/8485651865154138139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2015/05/rate-limiting-apis-and-java-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/8485651865154138139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/8485651865154138139'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2015/05/rate-limiting-apis-and-java-services.html' title='Rate limiting APIs and Java services when operating at Scale to solve Thundering herd problem'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-9154028573992311248</id><published>2015-04-10T16:57:00.003-05:00</published><updated>2015-04-10T16:57:47.525-05:00</updated><title type='text'>Cognitive overhead of email</title><content type='html'>Looks like these days bitching about email is my favourite topic. What can I do no matter what I do I just cant keep up with email flow.&amp;nbsp; The new kind of emails just keep increasing, I was doing a good job 2 years ago and close to inbox zero daily and was writing a lot of code but two things have increased the email flow to me recently:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Internal reports about production montioring from Newrelic, haproxy, exception analysis by team.&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Review requests.&amp;nbsp; This is a recent one. Most review requests are sent to Java review group and somehow I atleast need to spend 1-2 min on every email to first decide whether this is for me or not.&amp;nbsp; Even if there are 30 review request per day it consumes 30 min of my time just to make sense of it. Daily when I see 100 emails to be answered I feel disheartened that I cant write any code today.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;Both above items are necessary evil, #1 has increased production stability so my weekends are less busy.&amp;nbsp; #2 I am hoping eventually will increase code quality and lead to more ownership and processes that would lead to a self correcting system&amp;nbsp; requiring less involvement from leads.&lt;br /&gt;
&lt;br /&gt;
But I need to do a better job or come up with some other way to do this. Its almost 5:00&amp;nbsp; and I had two 1 hour meetings, 1 Elastic search node down that consumed 1.5 hours and 2 team calls 30 min each. And I cleared some 60 emails. The only code I wrote is removing some junk code as it was causing some exception when a penetration tester was testing that flow.&lt;br /&gt;
&lt;br /&gt;
Feeling frustrated as need to do something about this.&amp;nbsp; This &lt;a href=&quot;http://www.theverge.com/2014/8/12/5991005/slack-is-killing-email-yes-really&quot;&gt;Slack killing email&lt;/a&gt; sounds interesting.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/9154028573992311248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2015/04/cognitive-overhead-of-email.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/9154028573992311248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/9154028573992311248'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2015/04/cognitive-overhead-of-email.html' title='Cognitive overhead of email'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-8724622417193285471</id><published>2015-02-28T13:39:00.000-06:00</published><updated>2015-02-28T13:40:34.500-06:00</updated><title type='text'>New relic and statuspage.io integration </title><content type='html'>Monitoring tools exposes a lot of data and we use Nagios, cacti, graphite,newrelic, mixpanel, flurry, boundary and many more tools.&amp;nbsp; But one of the ask for Support and marketing teams is how can they internally know if something is wrong. We cant expect them to wade through so many systems and so many applications to make sense of what is operational and what is not.&amp;nbsp; For e.g. we use a lot of services to serve the cloud filer server solution and this is the first page of status of our services in new relic and it spans 2 pages.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL_RHqRCumpUhhlJpFazem8gFe6faujRgkn3DXNICqCIGBfo_8nJ-5ksjkHlpxsvLeCSLvqC0x55mPBbm4xvLhbpqhirj3yAFL2zF3S1GhMdKHt_yHRNmpkIGQVVrOwSIW0-7CE-uCL90/s1600/newrelic_status.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL_RHqRCumpUhhlJpFazem8gFe6faujRgkn3DXNICqCIGBfo_8nJ-5ksjkHlpxsvLeCSLvqC0x55mPBbm4xvLhbpqhirj3yAFL2zF3S1GhMdKHt_yHRNmpkIGQVVrOwSIW0-7CE-uCL90/s1600/newrelic_status.png&quot; height=&quot;320&quot; width=&quot;65&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Support team and management relies on Operations team to notify them if an issue is on going. To make this easy I did a Proof of concept integration application responsible for serving main website with Statuspage.io.&amp;nbsp; The idea is simple&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFsYlypIblhhanYooouql7O7daUM1_wh2rj6cZaLQ2cS9yx2k4riUNdrf0II2JpUF4kHFpMim7-TQhO-X61teSzPJKemysD4Rtga-U5vqbyeMWsF5P8StNXa8Q0AjURltFjIAZwAp_cMY/s1600/statuspage.io.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Create public metrics in statuspage.io that are human readable.&lt;/li&gt;
&lt;li&gt;Query new relic and various systems for application status.&lt;/li&gt;
&lt;li&gt;Map new relic green/red/yellow status and other system status to statuspage.io status.&lt;/li&gt;
&lt;li&gt;If there is a status change then update statuspage.io metric status.&lt;/li&gt;
&lt;li&gt;Statuspage.io lets user subscribe to status change via SMS or email so support can&amp;nbsp; signup for that.&lt;/li&gt;
&lt;li&gt;Once this is fully baked then we can make this public and let customers do the same.&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFsYlypIblhhanYooouql7O7daUM1_wh2rj6cZaLQ2cS9yx2k4riUNdrf0II2JpUF4kHFpMim7-TQhO-X61teSzPJKemysD4Rtga-U5vqbyeMWsF5P8StNXa8Q0AjURltFjIAZwAp_cMY/s1600/statuspage.io.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFsYlypIblhhanYooouql7O7daUM1_wh2rj6cZaLQ2cS9yx2k4riUNdrf0II2JpUF4kHFpMim7-TQhO-X61teSzPJKemysD4Rtga-U5vqbyeMWsF5P8StNXa8Q0AjURltFjIAZwAp_cMY/s1600/statuspage.io.png&quot; height=&quot;144&quot; width=&quot;320&quot; /&gt; &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now this is a proof of concept so I wrote a python script only with new relic integration with one application. I setup a cron job that runs every 2 min to do this integration. But we can enhance this script to derive status from various tools like new relic/nagios/boundary and map it transitively to human readable status. We can then even load this page up in various Tv screens in all offices to improve visibility.&lt;br /&gt;
&lt;br /&gt;
The script I used to do the integration was for proof of concept and I cooked up in 2-3 hours including api research so use with caution.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;import os&lt;br /&gt;import sys&lt;br /&gt;import requests&lt;br /&gt;import logging&lt;br /&gt;from logging.handlers import RotatingFileHandler&lt;br /&gt;&lt;br /&gt;spiPageId = &quot;PutYourPageIdHere&quot;&lt;br /&gt;cloudComponents = [&quot;Metadata APIs&quot;,&quot;Web Interface&quot;,&quot;Webdav&quot;,&quot;Sharing&quot;]&lt;br /&gt;nrToSpiStatusMap = {&quot;green&quot;:&quot;operational&quot;, &quot;yellow&quot;:&quot;degraded_performance&quot;, &quot;red&quot;:&quot;major_outage&quot;}&lt;br /&gt;&lt;br /&gt;def getNewRelicApplications(apiKey):&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; interestedApps = [&quot;cloud&quot;,&quot;mobile&quot;]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = {}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; url =&quot;https://api.newrelic.com/v2/applications.json&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers = {&#39;X-Api-Key&#39;: apiKey}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logging.info(url)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r = requests.get(url, headers=headers)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; json=r.json()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for application in json[&quot;applications&quot;]:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if application[&quot;name&quot;] in interestedApps :&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status[application[&quot;name&quot;]] = application[&quot;health_status&quot;]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return status&lt;br /&gt;&lt;br /&gt;def getSpiComponents(spiApiKey):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; url =&quot;https://api.statuspage.io/v1/pages/%s/components.json&quot; % spiPageId&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers = {&#39;Authorization:&#39;: &quot;OAuth %s&quot; % spiApiKey}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logging.info(url)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r = requests.get(url, headers=headers)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; json=r.json()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return json&lt;br /&gt;&lt;br /&gt;def updateSpiComponent(spiApiKey, componentId, status):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; url =&quot;https://api.statuspage.io/v1/pages/%s/components/%s.json&quot; % (spiPageId, componentId)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers = {&#39;Authorization:&#39;: &quot;OAuth %s&quot; % spiApiKey}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data = {&quot;component[status]&quot;:status}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logging.info(url)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r = requests.patch(url, data=data, headers=headers)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; json=r.json()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return json&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;def deriveSpiComponentToUpdate(spiApiKey, newRelicAppStatus):&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spiComponents = getSpiComponents(spiApiKey)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nrCloudStatus = newRelicAppStatus[&quot;cloud&quot;]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spiCloudStatus =&amp;nbsp; nrToSpiStatusMap[nrCloudStatus]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; componentsToUpdate = {}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for component in spiComponents:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if component[&quot;name&quot;] in cloudComponents :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if component[&quot;status&quot;] != spiCloudStatus : &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; componentsToUpdate[component[&quot;id&quot;]] = spiCloudStatus&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return componentsToUpdate&lt;br /&gt;&lt;br /&gt;def updateSpiComponents(spiApiKey, componentsToUpdate):&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for componentId in componentsToUpdate : &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = componentsToUpdate[componentId]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateSpiComponent(spiApiKey, componentId, status)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;def init():&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger = logging.getLogger(&#39;&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.setLevel(logging.DEBUG)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; log_format = &#39;Process-%(process)d %(asctime)s %(levelname)-8s %(message)s&#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler = RotatingFileHandler(&quot;statuspage.log&quot;, maxBytes= 20 *1024 * 1024 , backupCount=10)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; handler.setFormatter(logging.Formatter(log_format))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.addHandler(handler)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;# Main&lt;br /&gt;if __name__ == &quot;__main__&quot;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newRelicApiKey = sys.argv[1] &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spiApiKey = sys.argv[2]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; init()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newRelicAppStatus = getNewRelicApplications(newRelicApiKey)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; componentsToUpdate = deriveSpiComponentToUpdate(spiApiKey, newRelicAppStatus)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; updateSpiComponents(spiApiKey, componentsToUpdate)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt; &lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;!-- Blogger automated replacement: &quot;https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-eqIsbANM5Yo%2FVPIVmZb53BI%2FAAAAAAAACSM%2F6FugCnbUa5w%2Fs1600%2Fstatuspage.io.png&amp;amp;container=blogger&amp;amp;gadget=a&amp;amp;rewriteMime=image%2F*&quot; with &quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFsYlypIblhhanYooouql7O7daUM1_wh2rj6cZaLQ2cS9yx2k4riUNdrf0II2JpUF4kHFpMim7-TQhO-X61teSzPJKemysD4Rtga-U5vqbyeMWsF5P8StNXa8Q0AjURltFjIAZwAp_cMY/s1600/statuspage.io.png&quot; --&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/8724622417193285471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2015/02/new-relic-and-statuspageio-integration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/8724622417193285471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/8724622417193285471'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2015/02/new-relic-and-statuspageio-integration.html' title='New relic and statuspage.io integration '/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL_RHqRCumpUhhlJpFazem8gFe6faujRgkn3DXNICqCIGBfo_8nJ-5ksjkHlpxsvLeCSLvqC0x55mPBbm4xvLhbpqhirj3yAFL2zF3S1GhMdKHt_yHRNmpkIGQVVrOwSIW0-7CE-uCL90/s72-c/newrelic_status.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-3191974117427814943</id><published>2015-02-28T13:15:00.005-06:00</published><updated>2015-02-28T13:42:44.973-06:00</updated><title type='text'>Move fast break things but with monitoring</title><content type='html'>We run a complex system with multiple services and every 2 or 3 week we&amp;nbsp; update the Java applications.&amp;nbsp; I want to do it every week as most applications are stateless and can be patched anytime but the application serving the main website is using sticky session. We are working to make it failover sessions, once we do that, we can do mid week deployment and that will allow us to go faster than 3 weeks.&amp;nbsp; This week I pushed a huge infrastructure change related to user Id generation. I had asked ops team to check the status of new relic after the midnight deployment and it looked like this so everyone was happy.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL_RHqRCumpUhhlJpFazem8gFe6faujRgkn3DXNICqCIGBfo_8nJ-5ksjkHlpxsvLeCSLvqC0x55mPBbm4xvLhbpqhirj3yAFL2zF3S1GhMdKHt_yHRNmpkIGQVVrOwSIW0-7CE-uCL90/s1600/newrelic_status.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL_RHqRCumpUhhlJpFazem8gFe6faujRgkn3DXNICqCIGBfo_8nJ-5ksjkHlpxsvLeCSLvqC0x55mPBbm4xvLhbpqhirj3yAFL2zF3S1GhMdKHt_yHRNmpkIGQVVrOwSIW0-7CE-uCL90/s1600/newrelic_status.png&quot; height=&quot;400&quot; width=&quot;81&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I woke up and checked new relic mobile app and things looked ok to me. After finishing my morning routines I ran my daily exception report and one thing that caught the eye was 90K exceptions in last 12 hours in one of the files I had changed.&amp;nbsp; To gauge the impact I went in new relic and it showed me an error rate of 0.07 in one of the app&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLGtQkIFUjUnqcX57XgGbKMtkxQhnT4Ij1Qx_3Hs8cTFVeZoRj-5MkQk28WDLE6eLoTkXRWMXw_2cwnct5DXcijt8sK4pWOI_GfvsQTFhM7oSlrMr_VIF0JwdAtvmfW2f3KdxjnPJ16wY/s1600/eos_errors.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLGtQkIFUjUnqcX57XgGbKMtkxQhnT4Ij1Qx_3Hs8cTFVeZoRj-5MkQk28WDLE6eLoTkXRWMXw_2cwnct5DXcijt8sK4pWOI_GfvsQTFhM7oSlrMr_VIF0JwdAtvmfW2f3KdxjnPJ16wY/s1600/eos_errors.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
I then checked new relic and I see this blip that caused 90k errors, when the blip was there the status must have been red but then it was quickly green and Ops team didnt caught it&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5PjH0jXpDYn8QN05i8ckH1WOyTF8wKPipqFmQHr_pnIkG6NEsTlkC8xQi_A9bByeN6tcO1-EFl1FfMHRBdmqZCt2tIF76vabP9M2Vx-GDsZDD-hF5O7PYALtjT08VhPsjX-1rX0-cw_A/s1600/blip.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5PjH0jXpDYn8QN05i8ckH1WOyTF8wKPipqFmQHr_pnIkG6NEsTlkC8xQi_A9bByeN6tcO1-EFl1FfMHRBdmqZCt2tIF76vabP9M2Vx-GDsZDD-hF5O7PYALtjT08VhPsjX-1rX0-cw_A/s1600/blip.png&quot; height=&quot;130&quot; width=&quot;320&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
The issue was due to a wrong method invocation in one of the class used by this one specific application and it took just 15 min to fix after reproducing with a testcase.&amp;nbsp; So why didnt QA/UAT/automated tests caught it, well the issue was like a heisen bug and would occur only when the object is missing in cache. 99% of the calls would go to cache and only 0.07% were going to dao layer that had the bug.&amp;nbsp; I quickly made a patch and ops deployed it and I can see the issue is now gone.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgetdFZADIGatee0HrBamssmBaqoBZe8WxfMgnnHhWANfpEzzt6gYpGIA6lO4QVE4V7wR8iIREae5NvNEj5pOVOBaFBe8paicKOIJh6K3OmgoHSDnTskhyexjJkvBeq75fOCPLBiOVa9-c/s1600/errors_gone.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgetdFZADIGatee0HrBamssmBaqoBZe8WxfMgnnHhWANfpEzzt6gYpGIA6lO4QVE4V7wR8iIREae5NvNEj5pOVOBaFBe8paicKOIJh6K3OmgoHSDnTskhyexjJkvBeq75fOCPLBiOVa9-c/s1600/errors_gone.png&quot; height=&quot;144&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Had there been no monitoring it would have been difficult to catch these kinds of bugs. New relic and internal monitoring tools makes life easy as it exposes anomalies.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/3191974117427814943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2015/02/move-fast-break-things-but-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/3191974117427814943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/3191974117427814943'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2015/02/move-fast-break-things-but-with.html' title='Move fast break things but with monitoring'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL_RHqRCumpUhhlJpFazem8gFe6faujRgkn3DXNICqCIGBfo_8nJ-5ksjkHlpxsvLeCSLvqC0x55mPBbm4xvLhbpqhirj3yAFL2zF3S1GhMdKHt_yHRNmpkIGQVVrOwSIW0-7CE-uCL90/s72-c/newrelic_status.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-1202153354077671459</id><published>2015-02-11T12:04:00.003-06:00</published><updated>2015-02-11T12:08:11.244-06:00</updated><title type='text'>Email slavery</title><content type='html'>It seems I have become an EmailSlave. The first half of the day is spent in just answering to emails. There are so many emails where I am copied but I need not be. There are many emails&amp;nbsp; where its a 1-2 page email and somewhere down someone says @KP please answer this.&amp;nbsp; So it seems daily my work schedule is:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Signin to newrelic and check anomalies for 15 min.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Check emails related production exception report and yes there are a ton of these report daily. Need a better tool here as this model is not scalable. I need to reduce the incoming data at me to only see relevant data like what newrelic does. May be I need to create a webapp out of these emails.&lt;/li&gt;
&lt;li&gt;Check emails for next few minutes before team calls&lt;/li&gt;
&lt;li&gt;Do team calls&lt;/li&gt;
&lt;li&gt;Then again back to checking emails until a I have taken a best shot at answering everyone waiting for my reply.&lt;/li&gt;
&lt;li&gt;Attend team meetings on Tue/Thu&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Being an architect and coder at heart I don&#39;t feel satisfied at end of the day if there is nothing tangible getting done at the end. Yes I can say hey I replied to 100 emails in a day and did 2 calls but that seems bullshit.&amp;nbsp; If you read this article &lt;a href=&quot;http://tomtunguz.com/burnout/&quot;&gt;http://tomtunguz.com/burnout/&lt;/a&gt; it quotes &lt;br /&gt;
&quot;&quot;&lt;br /&gt;
&amp;nbsp;I suspect burnout is much more pronounced for information workers - 
people who deal in bits each day - because unlike a mason or an 
architect, the product of much of our work isn’t visible. Even the tools
 we use, virtual to do lists and email, hide the work we’ve completed: 
tasks checked off and emails sent.&lt;br /&gt;
&quot;&quot;&lt;br /&gt;
&lt;br /&gt;
I had same problems when I was doing daily calls with the team but I have reduced it a lot by only talking to Team on Monday, Wednesday, Friday and instead of talking to 5 people now I talk to only 2.&amp;nbsp; I need to find something similar for email.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It seems I am not the only one chasing this dreaded &lt;a href=&quot;https://twitter.com/hashtag/InboxZero?src=hash&quot;&gt;#inboxzero&lt;/a&gt;, I reached it once on December 15th but am again back to lots dreaded slavery.&lt;br /&gt;
&lt;br /&gt;
As per this venturebeat article &lt;a href=&quot;http://venturebeat.com/2015/02/09/sendgrid-launches-iphone-app-so-marketers-can-track-their-email-performance-stats-on-the-move/&quot;&gt;http://venturebeat.com/2015/02/09/sendgrid-launches-iphone-app-so-marketers-can-track-their-email-performance-stats-on-the-move/&amp;nbsp;&lt;/a&gt; &quot;Email’s &lt;a href=&quot;http://www.wired.com/2014/01/next-big-thing-missed-facebook-co-founder-says-email/&quot; target=&quot;_blank&quot;&gt;demise&lt;/a&gt; may have been greatly exaggerated — certainly if &lt;a href=&quot;https://sendgrid.com/&quot; target=&quot;_blank&quot;&gt;SendGrid’s&lt;/a&gt; efforts are anything to go by.&lt;br /&gt;
Last year, we reported that SendGrid had sent out &lt;a href=&quot;http://venturebeat.com/2014/03/05/sendgrid-has-sent-out-almost-as-many-emails-as-mcdonalds-has-sold-burgers/&quot; target=&quot;_blank&quot;&gt;almost as many emails as McDonald’s had sold burgers&lt;/a&gt;.
 A year on from that, SendGrid reports that it has sent more than 300 
billion emails since launch, equating to an average of 435 million 
emails per day, or 15 billion emails per month. &lt;br /&gt;
&quot;&lt;br /&gt;
&lt;b&gt;Action Items:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;I will myself try to think every time I hit reply All to see whether I need all these guys to be on the email or not.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Try writing short emails, twitter really make it harder for you to write as it allows only 140 chars but you eliminate a lot of garbage when you are constrained to only 140 chars.&amp;nbsp; check &lt;a href=&quot;http://www.igzebedze.com/2014/12/business-haiku-efficient-emails/?wpst=1&quot;&gt;http://www.igzebedze.com/2014/12/business-haiku-efficient-emails/?wpst=1&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/1202153354077671459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2015/02/email-slavery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/1202153354077671459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/1202153354077671459'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2015/02/email-slavery.html' title='Email slavery'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-5139348653461236966</id><published>2015-01-13T20:19:00.000-06:00</published><updated>2015-01-13T20:19:02.139-06:00</updated><title type='text'>Lint in mouse :)</title><content type='html'>My wired mouse in home setup is as old as I started working from home for my employer. Suddenly this week the scroll wheel would scroll up fine but it would not scroll more than one page, you had to scroll up half page before it would resume scroll down. At first I thought its my Firefox upgrade but soon I noticed same issue in eclipse and terminal.&amp;nbsp; In evening I use the laptop without wired mouse and it would work fine. That led me to conclusion that issue is with mouse.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
In USA people have a replace mentality, if something is not working and cheap, you can replace it. I was this close to ordering a new mouse on amazon when I thought let me shake it to see if something is stuck, but nothing came out.&amp;nbsp; I then saw a small screw in bottom, I unscrew it and I hit the jackpot, I was like wth &quot;Lint&quot;. My friend had similar issues with Lint in Iphone5 when his iphone wont charge and we used a breadtie to get out the lint and it was charging fine.&lt;br /&gt;
&lt;br /&gt;
I was like yay problem solved and now mouse is working like new again.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGivtfthqEOhYJ1Hibvcy_yR9XyuruahFdrZ6wiooRLuOevF_9tyM0rfgFsxmPIrz_69b0KGHxBfMjV9V411M80LFx9kUFAatdgLKC5sTuvQKY5JWGxSwejmdgsV-3nJrM4qy-IVZfzcI/s1600/IMG_1091.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGivtfthqEOhYJ1Hibvcy_yR9XyuruahFdrZ6wiooRLuOevF_9tyM0rfgFsxmPIrz_69b0KGHxBfMjV9V411M80LFx9kUFAatdgLKC5sTuvQKY5JWGxSwejmdgsV-3nJrM4qy-IVZfzcI/s1600/IMG_1091.JPG&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt; &lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRPf6wkR8jKxJdEwdzfZXZyVG_V_-LVUA0IdEQzNnyWkIC3XHBrqXDsKlvXCqdEEsHMhjjPfhRarr5e497hhHhx-8VCmIbqfAGWI_b9AKYF9kDpnfrG8-M7ObDVamZUnO83L9SZfyzX1Q/s1600/IMG_1093.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRPf6wkR8jKxJdEwdzfZXZyVG_V_-LVUA0IdEQzNnyWkIC3XHBrqXDsKlvXCqdEEsHMhjjPfhRarr5e497hhHhx-8VCmIbqfAGWI_b9AKYF9kDpnfrG8-M7ObDVamZUnO83L9SZfyzX1Q/s1600/IMG_1093.JPG&quot; height=&quot;240&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGu-y4FoakomjFwx_Z6bi_W3F02I1IiBa4shhjIHSCkytlCSB4ElqVG3B0jMgaBbSjC9j1QqYJS8CdOaKZ__Mv3vi9LFxj2aaWais37o0ddlOJoi3JPBghOofj9rrxRAW19YsnkR6uUxM/s1600/IMG_1094.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGu-y4FoakomjFwx_Z6bi_W3F02I1IiBa4shhjIHSCkytlCSB4ElqVG3B0jMgaBbSjC9j1QqYJS8CdOaKZ__Mv3vi9LFxj2aaWais37o0ddlOJoi3JPBghOofj9rrxRAW19YsnkR6uUxM/s1600/IMG_1094.JPG&quot; height=&quot;320&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/5139348653461236966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2015/01/lint-in-mouse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/5139348653461236966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/5139348653461236966'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2015/01/lint-in-mouse.html' title='Lint in mouse :)'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGivtfthqEOhYJ1Hibvcy_yR9XyuruahFdrZ6wiooRLuOevF_9tyM0rfgFsxmPIrz_69b0KGHxBfMjV9V411M80LFx9kUFAatdgLKC5sTuvQKY5JWGxSwejmdgsV-3nJrM4qy-IVZfzcI/s72-c/IMG_1091.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-5222046151874362694</id><published>2014-12-20T13:12:00.000-06:00</published><updated>2014-12-20T13:12:21.836-06:00</updated><title type='text'>Can you remain a fullstack developer?</title><content type='html'>&lt;a href=&quot;http://astartupguy.blogspot.com/2014/12/can-you-remain-fullstack-developer.html&quot;&gt;http://astartupguy.blogspot.com/2014/12/can-you-remain-fullstack-developer.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/5222046151874362694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2014/12/can-you-remain-fullstack-developer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/5222046151874362694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/5222046151874362694'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2014/12/can-you-remain-fullstack-developer.html' title='Can you remain a fullstack developer?'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-627749462481857900</id><published>2014-11-23T13:37:00.000-06:00</published><updated>2014-11-23T13:37:27.869-06:00</updated><title type='text'>Webhooks and Integrating Aseembla svn commits with Pivotal tracker stories</title><content type='html'>&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;I am intrigued by this webhook concept and it seems a very nice way for B2B communication.&amp;nbsp; Webhooks are powerful and it eliminates Poll for integrating with third parties. All you need is to have some REST api registered that will be called when an event occurs. A good e.g. of webhook for a cloud storage provider can be&amp;nbsp; &quot;automatically print this document on registered printers when a file is dropped in this folder&quot;. Lets assume all the customer needs to do is register a webhook &quot;http://xyz.foo.com/printer/xxd344/print?token=authTokenXXX and the cloud storage provider can then call this url and POST the body of document in input.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Recently I had a chance to play with webhooks when I was trying to move jenkins to EC2 for my f&lt;span style=&quot;font-family: inherit;&quot;&gt;riend &lt;/span&gt;and as part of it I moved his svn to assembla.com.&amp;nbsp; I saw webhooks and I thought I can integrate commits into svn hosted by assembla.com to pivotaltracker.com tickets.&amp;nbsp; It took just 1 hour to do it but it was fun, &lt;span style=&quot;font-family: inherit;&quot;&gt;apparently&lt;/span&gt; there are post commit hooks that you can add in svn but this was much easier to do because assembla.com has a webhook concept &lt;a href=&quot;https://helpdesk.assembla.com/customer/portal/articles/1607029-configuring-the-webhook-tool&quot;&gt;https://helpdesk.assembla.com/customer/portal/articles/1607029-configuring-the-webhook-tool&lt;/a&gt;&amp;nbsp; so all I need to do is find a pivotal api that would allow to post commit messages to it.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;It seems Pivotal tracker already has this &lt;a href=&quot;https://www.pivotaltracker.com/help/api/rest/v5#source_commits_post&quot;&gt;https://www.pivotaltracker.com/help/api/rest/v5#source_commits_post&lt;/a&gt;&amp;nbsp; .&amp;nbsp; The challenge was that assembla webhook doesnt allow you to pass any custom header where I can pass the X-TrackerToken header but after some api documentation trolling I found that you can pass the token in query string like &lt;br /&gt;&lt;br /&gt;https://www.pivotaltracker.com/services/v5/source_commits?token=sdfsdfdsfdsfdsfdsf&amp;nbsp; and I was done. After Configuring the integration the commit messages show up in pivotal story. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpsNsjVDrFUNk0sZelMATd07it30KRChq7z0nj-7EN9l11AoHJrTkXDoTSj2GNYsd4onEU7Pom5UFLvAFCx6rrN0RH9okHHRqGpE8scQuT_PyYbg-u134A4R2bBp284xALHvasDAdfeK0/s1600/pivotal+tracker+integration.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpsNsjVDrFUNk0sZelMATd07it30KRChq7z0nj-7EN9l11AoHJrTkXDoTSj2GNYsd4onEU7Pom5UFLvAFCx6rrN0RH9okHHRqGpE8scQuT_PyYbg-u134A4R2bBp284xALHvasDAdfeK0/s1600/pivotal+tracker+integration.png&quot; height=&quot;191&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/627749462481857900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2014/11/webhooks-and-integrating-aseembla-svn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/627749462481857900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/627749462481857900'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2014/11/webhooks-and-integrating-aseembla-svn.html' title='Webhooks and Integrating Aseembla svn commits with Pivotal tracker stories'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpsNsjVDrFUNk0sZelMATd07it30KRChq7z0nj-7EN9l11AoHJrTkXDoTSj2GNYsd4onEU7Pom5UFLvAFCx6rrN0RH9okHHRqGpE8scQuT_PyYbg-u134A4R2bBp284xALHvasDAdfeK0/s72-c/pivotal+tracker+integration.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-4485647123542873951</id><published>2014-11-20T22:13:00.003-06:00</published><updated>2014-11-20T22:13:34.434-06:00</updated><title type='text'>Data driven performance issue and NewRelic</title><content type='html'>NewRelic really shines at discovering these data driven performance issues. Earlier we would find them late or these would be buried but now they seem so obvious if the engineer is paying attention.&amp;nbsp; I was casually trolling new relic and sorted all apps by avg time per api and one of our core application in one DC was taking twice the avg time for each call than all other DCs. I immediately compared that DC with other DCs and I saw was a graph like below in DC1&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJV7-3f583hlr3Vw_Yc2dlHm812lCbG8sy3tWbjml0V-Z4R5hnWdHHegwx7J943X3-RWEp7i9i-MGboHk02ZZx9lL6t-S-pN2K2ZuQmrDLegX6UCjYY2o9l1V1FG0ys2-THw7UGdvNZqk/s1600/DC1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJV7-3f583hlr3Vw_Yc2dlHm812lCbG8sy3tWbjml0V-Z4R5hnWdHHegwx7J943X3-RWEp7i9i-MGboHk02ZZx9lL6t-S-pN2K2ZuQmrDLegX6UCjYY2o9l1V1FG0ys2-THw7UGdvNZqk/s1600/DC1.png&quot; height=&quot;175&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
and I saw this in DC2&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS1U7M42xZTQO8Q8uDL9ioooKwceZ0aVhHXa7KHCT7dqe4ddC6_MFNeNLBvOHp602KILTjWRIeK00X0HCLoyhi8wk55NLlIkhf_9B0GRzid2KgeflXrRzQy0bev5j7vSAXVQn5b-zKiHg/s1600/DC2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS1U7M42xZTQO8Q8uDL9ioooKwceZ0aVhHXa7KHCT7dqe4ddC6_MFNeNLBvOHp602KILTjWRIeK00X0HCLoyhi8wk55NLlIkhf_9B0GRzid2KgeflXrRzQy0bev5j7vSAXVQn5b-zKiHg/s1600/DC2.png&quot; height=&quot;173&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
Clearly DC1 is spending abnormal amount of time in database. So I went to database view and saw this in DC1 &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg96u6KhpErdH7JX6DSSXXEo5hLeCyE0Nr1-5MrQtRDS2DfpIEZ1BZJtIWU_vvzR6PG-wbZtfNmhScgsg5bU8I87paef026aYVvok5574VaQa_yKGXAZV7EdyLurbSn8R22Ma6eT6XMHlU/s1600/dc_1_db.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg96u6KhpErdH7JX6DSSXXEo5hLeCyE0Nr1-5MrQtRDS2DfpIEZ1BZJtIWU_vvzR6PG-wbZtfNmhScgsg5bU8I87paef026aYVvok5574VaQa_yKGXAZV7EdyLurbSn8R22Ma6eT6XMHlU/s1600/dc_1_db.png&quot; height=&quot;183&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
and I saw this in DC2&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8LB73xBlCsRh-w_Hk0XCLH1XOzEI5_Wjf0B9MNfzragg14wg4D-Lj6trqZWVDh5zENzLbFLyS17DZYzr_YyekYMKQnkBwf3hp80huR6bund9exJHI0wvXTa7hcJkhTY9lRFZD7hEr2AE/s1600/dc_2_db.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8LB73xBlCsRh-w_Hk0XCLH1XOzEI5_Wjf0B9MNfzragg14wg4D-Lj6trqZWVDh5zENzLbFLyS17DZYzr_YyekYMKQnkBwf3hp80huR6bund9exJHI0wvXTa7hcJkhTY9lRFZD7hEr2AE/s1600/dc_2_db.png&quot; height=&quot;188&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Clearly something is weird in DC1 even though its same codebase.&amp;nbsp; 309K queries per minute seems abnormal.&amp;nbsp; Within 5 min I found out its a n query problem. Aparently some customer has 4000 users&amp;nbsp; and he has created 3000 groups and the group_member table has 40K rows for this customer. Normally all of our customers would create 10-50 groups and there is a code that iterates over each group and calls get members.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
For normal customers if he makes 100 calls per minute to this api it would cause 100*10 calls or 1K calls per minute but in this dc it causes 100*3000 or 300K queries.&amp;nbsp; As we are near to weekend release, for now I replaced n query with a bulk query and then we would optimize this code in next release or work with customer to see if his data modelling has some flaws and it can be achieved some different way.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/4485647123542873951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2014/11/data-driven-performance-issue-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/4485647123542873951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/4485647123542873951'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2014/11/data-driven-performance-issue-and.html' title='Data driven performance issue and NewRelic'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJV7-3f583hlr3Vw_Yc2dlHm812lCbG8sy3tWbjml0V-Z4R5hnWdHHegwx7J943X3-RWEp7i9i-MGboHk02ZZx9lL6t-S-pN2K2ZuQmrDLegX6UCjYY2o9l1V1FG0ys2-THw7UGdvNZqk/s72-c/DC1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-2414096098137592357</id><published>2014-11-16T16:25:00.001-06:00</published><updated>2014-11-16T16:46:50.159-06:00</updated><title type='text'>AWS and rise of devops </title><content type='html'>I used to always wonder how Snapchat, Pinterest and Instagram were able to scale to millions of users with just 10-15 engineers.&amp;nbsp; I am a Java Architect but when it comes to networking, operations and other stuff I am a Noob beyond basic skills.&amp;nbsp; Recently our ops team did some subnet changes and some IP changes and added 10G network between some services, All this is grey area to me and I was like you really need to hire Operations for this so how come these other startups did without so many people.&amp;nbsp; One of my friend was after me for months to help him move his jenkins servers from Ukraine to EC2 as Ukraine is in turmoil. I have no ops expertise so this was tricky but here is how I got it done over 2 weekends as Dallas is freezing due to cold front and I dont have driver license due to immigration fiasco by USCIS. So this friend really got benefit due to it as I had nothing else to do on weekend.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;I took a vanilla CentOS AMI and launched an instance in EC2. But when launching it asked me whether I want to launch in ec-classic or EC2-VPC. I was curious so read that EC-VPC will allow you to isolate your instances and allows better security groups by blocking traffic to internal servers from outside using security groups. &lt;/li&gt;
&lt;li&gt;Creating a VPC was piece of cake as I followed the wizard and read the docs. I really wanted to use &lt;a href=&quot;http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario2.html&quot;&gt;http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario2.html&lt;/a&gt;&amp;nbsp; but went with &lt;a href=&quot;http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario1.html&quot;&gt;http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Scenario1.html&lt;/a&gt;&amp;nbsp; as the earlier one was requiring an extra NAT instance.&lt;/li&gt;
&lt;li&gt;Finally I launched an EC2 instance with CentOs and installed jenkins using &lt;i&gt;sudo yum install jenkins&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;One thing I wanted was a banner when I ssh to the instance so I&amp;nbsp; googled and found that all you need to do is go to &lt;a href=&quot;http://patorjk.com/software/taag/#p=display&amp;amp;h=0&amp;amp;f=Big&amp;amp;t=Jenkins%0A&quot;&gt;http://patorjk.com/software/taag/#p=display&amp;amp;h=0&amp;amp;f=Big&amp;amp;t=Jenkins%0A&lt;/a&gt;&amp;nbsp; and generate a text banner and put it in /etc/motd and you are done. now when you login to instance it prints &quot;Jenkins&quot;&lt;/li&gt;
&lt;li&gt;Now how do I move jenkins, his old instance was up for 2 years and I read moving jenkins from one box to other&amp;nbsp; requires just copying home from one box to other &lt;a href=&quot;http://stackoverflow.com/questions/8724939/how-to-move-jenkins-from-one-pc-to-another&quot;&gt;http://stackoverflow.com/questions/8724939/how-to-move-jenkins-from-one-pc-to-another&lt;/a&gt;&amp;nbsp; But when I did du -hsm I got 40G. I was like no way I want to move all this shit.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Finally i installed jenkins thinbackup plugin &lt;a href=&quot;https://wiki.jenkins-ci.org/display/JENKINS/thinBackup&quot;&gt;https://wiki.jenkins-ci.org/display/JENKINS/thinBackup&lt;/a&gt;&amp;nbsp; on both servers. On the old one I took a thinkbackup and then zipped it and overwrote the JENKINS_HOME directory /var/lib/jenkins .&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Then I ran &quot;chown +R jenkins /var/lib/jenkins&quot; &lt;/li&gt;
&lt;li&gt;&amp;nbsp;I asked him to switch DNS to new server.&lt;/li&gt;
&lt;li&gt;I took a dump of svn and import into a new &lt;a href=&quot;https://www.assembla.com/&quot;&gt;https://www.assembla.com&lt;/a&gt; account and due to this I didnt needed to setup svn server separately. &lt;/li&gt;
&lt;li&gt;We restarted the jenkins using &quot;service jenkins restart&quot; and the new jenkins was up with all configs as old server, I changed all svn repo paths to point to assembla credentials/urls and we were done.&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;Now comes the hard part. After all this was done, he was using one box already in EC2 for running selenium tests and that agent was down. No matter what I do it wont connect. I checked jenkins config page and it was using port 15001.&amp;nbsp; I edited Ec2-security group and allowed 15001 port and it wont connect.&lt;br /&gt;
&lt;br /&gt;
Then I thought may be I need to run this box in same VPC, me being a noob this was a bad idea that derailed me. In EC2 you cant migrate an instance from ec-classic to EC2-VPC. The only way is to create an AMI from old instance and launch a new instance, I did that and it took 4 hours including reading docs to create an AMI, but even then it wont connect. I deleted that AMI/snapshot and new instance and fired up old instance.&lt;br /&gt;
&lt;br /&gt;
Finally I switched to debugging using raw telnet and saw that from the jenkins instance I can telnet to localhost 15001 but I cant from his laptop or from selenium box.&amp;nbsp; Finally figured out that the CentOS AMI I picked had its own firewall and had only 80 and 443 port open.&lt;br /&gt;
&lt;br /&gt;
We added&lt;br /&gt;
sudo iptables -I INPUT -p tcp --dport 15001 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
and finally all was done.&lt;br /&gt;
&lt;br /&gt;
In short EC2 had made bare bones operations people job in jeopardy, they need to move to devops.&amp;nbsp; AWS is innovating like crazy and today he sent me some links on AWS Lambda &lt;a href=&quot;http://aws.amazon.com/lambda/&quot;&gt;http://aws.amazon.com/lambda/&lt;/a&gt; and AWA Aurora &lt;a href=&quot;https://aws.amazon.com/blogs/aws/highly-scalable-mysql-compat-rds-db-engine/&quot;&gt;https://aws.amazon.com/blogs/aws/highly-scalable-mysql-compat-rds-db-engine/&lt;/a&gt;&amp;nbsp;&amp;nbsp; I was like hmm if startups have all this then do they need to hire Mysql dbas until the site has reached a large momentum.&lt;br /&gt;
&lt;br /&gt;
Finally after doing all this I understood how Pinterest, Snapchat, Instagram were able to keep up with a large infrastructure with least no of employees, even less than my employer when they were at similar scale.&amp;nbsp; For storage you use S3, for database you use aurora, for load balancing you use ELB and you automate build/deploy via jenkins/puppet and now a days docker. I remember 10-14 years ago when I started working for startups, they have to hire an&amp;nbsp; army of people to get prototype out of the door and that means VCs need to write a Series A check. It seems today people at YC are doing it with 3-4 people with only Seed funding. So the seed funding has become the old Series A. Who needs an army of people to install/manage 100s of severs when automation tools combined with Power of AWS, GCS can do the job for you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Off-course all this comes at a cost, when the site becomes really big, AWS bills are higher, recently at my employer one of our GCS performance testing env had a bill of $10K for 1 month which went in poof as you&amp;nbsp; don’t own the hardware, you lease it so its like Renting vs owning the house. But we were able to finish perf testing quickly as bringing up new env was faster than stuck in hardware pipeline. Also Adrian crockfort once said if you are leasing SSD then its even better as the wear out of SSD is not your problem (&lt;a href=&quot;http://observationdeck.io9.com/not-my-circus-not-my-monkeys-457554833&quot;&gt;http://observationdeck.io9.com/not-my-circus-not-my-monkeys-457554833&lt;/a&gt;). But&amp;nbsp; startups have an opportunity cost, if they can get the product out with less developers in less time then later when they become big &lt;a href=&quot;http://neopatel.blogspot.com/2014/07/keep-slogging-help-is-on-way.html&quot;&gt;they can hire specialist&lt;/a&gt;&amp;nbsp; Also each developer now a day in bay area has a fully loaded cost of &amp;gt;150-200K so for startups strapped for cost, AWS and GCS can be a boon and they can solve the high bill problem when they really reach that stage. Isnt it great if you get an AWS bill of $100K because that means you must be making 10-30 times the $$$$.</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/2414096098137592357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2014/11/aws-and-rise-of-devops.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/2414096098137592357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/2414096098137592357'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2014/11/aws-and-rise-of-devops.html' title='AWS and rise of devops '/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-7811394996118768114</id><published>2014-11-10T15:55:00.000-06:00</published><updated>2014-11-10T15:55:15.020-06:00</updated><title type='text'>A well intentioned public api can bring down a server</title><content type='html'>Apis are powerful creatures and people can use them to do tons of weird things. We had exposed a public api to create a link but our UI had a capability to select multiple files and generate links for them in bulk in call, so our public api mimicked this behavior.&lt;br /&gt;
&lt;br /&gt;
Today a server was running hot with full GC, I took a heap dump and restarted it. Upon analysing the heap dump in &lt;a href=&quot;http://www.eclipse.org/mat/&quot;&gt;Eclipse Memory Analyzer&lt;/a&gt; I found that Sys log appender was choked and it had a queue of 10K messages with each being 2MB. I copied the value and found the class name in log message.&lt;br /&gt;
&lt;br /&gt;
Aparently whenever a link was created a log message was written that would iterate over each file and log a line for each file. There was a bug in the log message that&amp;nbsp; it would log entire message instead of that file.&lt;br /&gt;
&lt;br /&gt;
for (target in linkRequest.getTargets()) {&lt;br /&gt;
&amp;nbsp;logger.info(&quot;queuing preview generation for {}&quot;, event) ;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
QA/developers cant detect this and most people in code review focuses less on logger messages.&lt;br /&gt;
&lt;br /&gt;
But there was a customer who today did some automation and created a link for each file in the folder in one call,&amp;nbsp; he had 10K files in that folder. What this means is that the 2MB payload for link generation request was logged in for loop 10K times causing full GC.&lt;br /&gt;
&lt;br /&gt;
The fix was simple to just change logger message in for loop but I will talk to API designer to put some upper limit on no of links created in 1 call.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
for (target in linkRequest.getTargets()) {&lt;br /&gt;
&amp;nbsp;logger.info(&quot;queuing preview generation for {}&quot;, &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;target&lt;/b&gt;&lt;/span&gt;) ;&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/7811394996118768114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2014/11/a-well-intentioned-public-api-can-bring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/7811394996118768114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/7811394996118768114'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2014/11/a-well-intentioned-public-api-can-bring.html' title='A well intentioned public api can bring down a server'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-6123800430185426149</id><published>2014-10-31T23:31:00.004-05:00</published><updated>2014-10-31T23:34:17.097-05:00</updated><title type='text'>Paralysis by Analysis</title><content type='html'>A lot of times we run into &lt;a href=&quot;http://en.wikipedia.org/wiki/Analysis_paralysis&quot;&gt;Paralysis by Analysis&lt;/a&gt;. We use Lucene for indexing cloud storage data and its a very old home grown system, we are soon going to retire it and replace it with Elastic Search.&amp;nbsp; Recently we ran into &lt;a href=&quot;http://en.wikipedia.org/wiki/Analysis_paralysis&quot;&gt;Paralysis by Analysis&lt;/a&gt; situation where we were waiting for Elastic Search project to go live to implement Folder Search and we were debating over it for months while customers were cribbing for it. The move to Elastic Search requires migration of billions of files and PetaBytes of contents to be migrated which can take months. Finally I got approval that instead of waiting for ElasticSearch lets do a simple canonical prefix based search out of database directly. It took 2 days to implement server api and 1 week for UI,plumbing work and QA.&amp;nbsp; As we use Mysql Sharding, the solution scaled fine, all I needed to ensure was proper indexes were there. Two days I got email from Support that customers are in love with Folder search :).&lt;br /&gt;
&lt;br /&gt;
Offcourse this is not perfect solution because we cant do fuzzy searches, word tokenization and all the power that comes with Elastic Search but may be 90% of the customers dont even need them and eventually after Elastic Search we would reach there.&amp;nbsp; This is why hackathons are more important because people would come up with quick hacks that weren’t earlier done due to Paralysis by Analysis but improve the product.&amp;nbsp; Not each hack would make it to production or some would make it but not scale or would get low usage from customers, so they need to be culled.&amp;nbsp; But sometimes all you need is &quot;to try&quot;. Some hacks If I have to participate in a hackathon would be :&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Activity streams on Folders&lt;/li&gt;
&lt;li&gt;Folder comments&lt;/li&gt;
&lt;li&gt;Workflows on top of documents&lt;/li&gt;
&lt;li&gt;User and Groups Audit report&lt;/li&gt;
&lt;li&gt;Better custom SMTP integration&lt;/li&gt;
&lt;li&gt;Status monitor like &lt;a href=&quot;https://status.newrelic.com/&quot;&gt;https://status.newrelic.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Show creation time and posted time of file on UI&lt;/li&gt;
&lt;li&gt;Server based trigger for uploading sync client logs (this is one of my pet peeve).&lt;/li&gt;
&lt;li&gt;Parallel execution of unit tests&lt;/li&gt;
&lt;li&gt;and many more &lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/6123800430185426149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2014/10/paralysis-by-analysis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6123800430185426149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6123800430185426149'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2014/10/paralysis-by-analysis.html' title='Paralysis by Analysis'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-6407510397276110687</id><published>2014-09-04T23:30:00.002-05:00</published><updated>2014-09-04T23:35:55.470-05:00</updated><title type='text'>Thinking of moving the blog to Quora or starting a new public blog</title><content type='html'>Reading a book on inbound marketing &lt;a href=&quot;http://www.amazon.com/Inbound-Marketing-Attract-Delight-Customers/dp/1118896653&quot;&gt;http://www.amazon.com/Inbound-Marketing-Attract-Delight-Customers/dp/1118896653&lt;/a&gt; by Hubspot founders and it clarified some of my concepts. I intend to finish the book, its just that in the age of Quora, Twitter and Techcrunch you can get easily distracted so I am reading at turtle&#39;s pace. Even Netflix and cable TV has lost its charm for me. One reason I had ordered a hard copy instead of kindle so I don’t get distracted and can read it with focus, but now a days I feel like Quora is much more interesting than reading books. But books have their own importance, Quora and blogs are random reading with no pattern and you get some pointers whereas books are more structured reading so on any day I would prefer book over blogs if I have to read a concept in detail and call me old school but I still would prefer paper copy over ebook.&lt;br /&gt;
&lt;br /&gt;
Anyway coming back to the topic I still get close to 50K hits per year on this blog, so thinking how can I apply concepts of book to the blog.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG8t-NDkLyNHQleTiPoV73LDQ7iYGqxOfIWPk96Ygcn4FaUnJj1QLRgQk7E-jx0C_fjhv3VSzt7U3062rnsleuQ3C1E78tHFXkLt0itcbW-IsJGDvoYwvSdMGTM9U8THMFg-i7f0LuoCc/s1600/blogstats.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG8t-NDkLyNHQleTiPoV73LDQ7iYGqxOfIWPk96Ygcn4FaUnJj1QLRgQk7E-jx0C_fjhv3VSzt7U3062rnsleuQ3C1E78tHFXkLt0itcbW-IsJGDvoYwvSdMGTM9U8THMFg-i7f0LuoCc/s1600/blogstats.png&quot; height=&quot;273&quot; width=&quot;640&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
On Quora in past 6 months my content had 31.6K views&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaZ1DJV09dOT8HPj_-Ex5LOfVwu6MYlvlwmSUKPy2TiJG4_yIIOctDsjAkgDtmRPUQ0G5sZVv_qNCZ5loQevG6bKtZM8qZBBnk38fUO8LpXEZ5hVxRsXwSwcj5xfkbyUIJypU-KlyP190/s1600/quora.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaZ1DJV09dOT8HPj_-Ex5LOfVwu6MYlvlwmSUKPy2TiJG4_yIIOctDsjAkgDtmRPUQ0G5sZVv_qNCZ5loQevG6bKtZM8qZBBnk38fUO8LpXEZ5hVxRsXwSwcj5xfkbyUIJypU-KlyP190/s1600/quora.png&quot; height=&quot;331&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In terms of hits it doesn’t makes much difference to switch but earlier I used to think that you write blogs and search engine 
would scrape it and you would get find(which happened for a rabbitmq post I wrote which get linked to rabbitmq site and is the most visited post on this blog). Apparently I was dead wrong the book says you need to not only need to write content but you need to market it also on social sites like facebook, twitter, linkedin and retweet it and what not so people would link it. I don’t feel comfortable sharing all the posts from this blog as is due to various reasons so I am thinking of moving to Quora for posts that I feel comfortable sharing and I can share them on twitter/linked and leave the private and more technical posts here (the idea is not to market myself but just compare stats and see if same concepts in book can be applied and I can see them in action. I had applied Google analytics first on my blog and then in the my employer startup the same way. Alternatively another idea is to start a new blog on blogger for public posts and leave semi private posts here.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Still debating and will probably reach some conclusion soon.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/6407510397276110687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2014/09/thinking-of-moving-blog-to-quora-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6407510397276110687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/6407510397276110687'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2014/09/thinking-of-moving-blog-to-quora-or.html' title='Thinking of moving the blog to Quora or starting a new public blog'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG8t-NDkLyNHQleTiPoV73LDQ7iYGqxOfIWPk96Ygcn4FaUnJj1QLRgQk7E-jx0C_fjhv3VSzt7U3062rnsleuQ3C1E78tHFXkLt0itcbW-IsJGDvoYwvSdMGTM9U8THMFg-i7f0LuoCc/s72-c/blogstats.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5003701650524272230.post-5568816674267003603</id><published>2014-08-30T01:01:00.000-05:00</published><updated>2014-08-30T01:11:23.864-05:00</updated><title type='text'>Using email to manage work queue can be deceptive</title><content type='html'>I loathe on emails that have been replied more than 5-6 times. I am sometimes copied on emails where there are 20 replies. Today I have an email about post commit reviews which has 20 replies, Grrr.&amp;nbsp; I procrastinated whole day to read it and looks like I am not goint to read it today.&lt;br /&gt;
&lt;br /&gt;
Problem with 20+replies email is that by the time you end up reading all 20 of them you have lost context of what is the final picture.&lt;br /&gt;
&lt;br /&gt;
I saw this infographic from 2012 &lt;a href=&quot;http://mashable.com/2012/11/27/email-stats-infographic/&quot;&gt;http://mashable.com/2012/11/27/email-stats-infographic/&lt;/a&gt;&amp;nbsp; that 28% of time is spent on reading emails.&amp;nbsp; I think for me its may be 50% or more as I work from home and most communication is over emails except very few which happens&amp;nbsp; over skype or phone calls.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://rack.3.mshcdn.com/media/ZgkyMDEyLzExLzI3LzE1XzE2XzIwXzI0MF9maWxlCnAJdGh1bWIJMTIwMHg5NjAwPg/71ae774b&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://rack.3.mshcdn.com/media/ZgkyMDEyLzExLzI3LzE1XzE2XzIwXzI0MF9maWxlCnAJdGh1bWIJMTIwMHg5NjAwPg/71ae774b&quot; height=&quot;316&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Would love to explore tools to save time.&amp;nbsp; I found 2 new tools in gmail so far, &quot;Canned Response&quot; and &quot;Mark as Read&quot; button, lets see if it helps.&lt;br /&gt;
&lt;br /&gt;
For e.g. I would be copied on email &quot;23.7.3 CL- 120157 on all Appnodes and EOS nodes in SJC, AVL and AM2&quot;, now I don’t want to delete it as I may need it in case there is an issue in prod. But I also want to move it out of my Unread queue as I am using email to manage my work queue. I am hoping now I don’t need to open email and mark it as read, a one click would do it.&lt;br /&gt;
&lt;br /&gt;
Also thinking of adding more filters to just sweep some emails I care less to trash as other members are taking care of dealing with them.&lt;br /&gt;
&lt;span class=&quot;J-J5-Ji&quot; id=&quot;:u6&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline-block; font-family: arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; position: relative; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;J-J5-Ji&quot; id=&quot;:u6&quot; style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: #222222; display: inline-block; font-family: arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; position: relative; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
But this got me into thinking should I use email to manage my work queue, I used to use a task list before but problem was that some items would never get done. Then I switched to gmail and all pending work would be in emails&amp;nbsp; marked as Unread, I would have read it but if any action is required I would mark it as Unread.&amp;nbsp; I am almost at a tipping point because it takes me almost from 9-4 to talk to my team and deplete the email queue. That leaves sometimes 1 hour or sometimes 2 hours to write any kind of code. Sometimes it feels like I got rid of all emails that came to me in the day but I got nothing productive done. So was I just pretending to work?&lt;br /&gt;
&lt;br /&gt;
Also gmail is deceptive, when I come in morning it shows me I have 76 unread emails but daily there are many emails that have between 3-5 replies and some are suckers with 10+ replies. So really its almost 150+emails to deal with and this is after sending lot of emails to trash directly.&lt;br /&gt;
&lt;br /&gt;
Need to find some other way to manage the work queue, I had&amp;nbsp; tried using JIRA but that also hasn’t fared well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://neopatel.blogspot.com/feeds/5568816674267003603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://neopatel.blogspot.com/2014/08/problem-with-email.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/5568816674267003603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5003701650524272230/posts/default/5568816674267003603'/><link rel='alternate' type='text/html' href='http://neopatel.blogspot.com/2014/08/problem-with-email.html' title='Using email to manage work queue can be deceptive'/><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>