5 ms·
How Heap's 5-line MVP evolved into a 30,000 TPS beast
- pdog 13y ago> Are you still on MongoDB? > Oh god no. Pretty damning condemnation of MongoDB, no?
- matm 13y agoFor our use case, it just wasn't the right fit. In particular: 1) we needed more features/performance than Mongo's aggregation framework provided, 2) the mongod global lock was prohibitive for our write throughout (turning off fsync wasn't suitable), 3) schema migrations were difficult/impossible without transactional guarantees. It seems like Mongo's addressed some of these concerns since we started building Heap.
- raverbashing 13y agoHumm... No They also outgrew PostgreSQL, and gave up on Redshift, is that a condemnation of them as well?
- deleted 13y ago[deleted]
- aaronblohowiak 13y agoLooks like they are still using PostgreSQL, just not a single instance. It looks like they are using Citus Data to handling sharding and merging responses.
- chris_wot 13y agoHe said that PostgreSQL scaled pretty well, but he got rid of MongoDB in one week. Seems pretty damning to me.
- copergi 13y agoOdd that they think they outgrew postgresql, while only dealing with a tiny 30k tps.
- shostack 13y agoIt looks like Heap is making some progress with their UI which I'm glad to see. That said, I'd love to see Heap pull in the rest of the web analytics picture. Event data is interesting, and they seem to have a decent solution for the issue of setting up a massive amount of event tracking (and losing all the data you haven't set events for yet). However event data in a silo without the context of things like referral URLs, search query data, campaign metrics, etc. are critical for gaining the full picture. Perhaps I didn't tinker with the demo enough, but I didn't see those pieces of the puzzle present. For any online marketer serious about analytics, you need the complete picture under one roof. That said, this is a great step forward in a space where this pain point around setting up event tracking has been largely unsolved for some time. I wouldn't be sad at all to see them acquired by someone like MixPanel, KissMetrics, or Google.
- matm 13y agoWe automatically annotate each event with referrer, search keyword, and all UTM properties. Full list of properties here: https://heapanalytics.com/docs#events https://heapanalytics.com/docs#events Would love to know if there's other important context we're missing.
- shostack 13y agoAwesome, clearly a miss on my part. Would love to see more interface elements designed around exploring the web analytics piece of it though. Google Analytics does a fantastic job of making this data intuitive (well, for someone knowledgeable of the space) and explorable. Things like cross-channel tracking and other items are also critical. I'm playing around with the demo in our test environment right now and really love your Event Visualizer tool. I need to play a bit more, but I'm hoping that your ability to check/uncheck the components that define the event will let us work around issues of dynamic selectors generated by YUI which was our team's concern for why Heap might not work with our setup. EDIT: Looks like YUI is still a major issue. If you're curious, you can look up my HN username in your email list to find my account and see what I'm talking about.
- 13y ago
- integraton 13y agoSo is the "massive custom data store" using Postgres or is it something totally different? Dan's answer sounds like Postgres + Citus DB is the current setup.
- mallyvai 13y agoIt's in the interview, like halfway down. They're using Citus over Postgres.
- nrbafna 13y agoI am wondering what the 5 lines for MVP were. Anyone mind taking a shot?
- matm 13y agoThis is referring to the integration code itself. It was something like: var DOMEvents = ['click', 'submit', 'change']; for (var i = 0; i < DOMEvents.length; i++) { window.addEventListener(DOMEvents[i], function(e){ $.post('/collector', {type: e.type, target_id: e.target.id, target_class: e.target.className}); }); }
- onion2k 13y agoThat's interesting and immediately obvious how it could both be useful and valuable in the right domain. Logging what people are doing on modern event-driven websites definitely is a problem worth solving. My let's-made-a-complicated-version-first mindset would have extended jQuery's .bind or .on prototype in case the site is using event.stopPropagation(), and that's why I never finish anything. Thanks for sharing.
- shamsulbuddy 13y agoThis is rocksolid basic script..one quick question..if you post on every event then dont you think so that it will generate huge traffic..how did you handle that
- mstump 13y ago30k TPS is pretty damn low. That's less than the throughput of a single Cassandra node...