Micro Matt

Micro thoughts and mini posts.

Continuing on some performance improvements after last week’s downtime. Today, I implemented some long-needed changes to reduce the number of UPDATEs happening on the database at any given moment.

Previously, every page load would immediately count the visitor and update the database. This worked perfectly fine when we were small, but now at normal traffic levels, and especially with spikes like the one we saw last week, this has become too much for the database to handle. Also since we use database replication, the issue has become visible to users, as (I believe) transactions pile up and things get out of sync between database servers.

With this change, many of those issues should go away. Some quick benchmarking showed that responses no longer pile up and gradually grind everything to a halt, as they would’ve before — even with high concurrency and sustained requests, the slowest response could be 600ms. In my tests, it seems now the application can handle at least three times as many concurrent visitors as it could before this change.

We generally see more traffic every day around 10-11am Eastern, so that should put this to the test tomorrow. But it’s looking good so far.

#dev #performance

Thoughts? Discuss...

Saw a ton of traffic on Write.as this morning, around the same time we do most days, but a magnitude more than usual. It was concentrated on blogs hosted under the write.as domain, and it eventually affected the web application.

I realized that the bottleneck was most likely in the database — too many connections were being made, slowing down queries, causing the application servers to wait too long, causing the backlog of connections into the site to pile up.

To solve this, I added another database replica, and then dug into the application code. While requests were dragging, they were still being fulfilled by the server and database, even long after a visitor might’ve reasonably expected a response, or completely left the page. So I took advantage of Go’s context package to put some limitations on these database queries, particularly the ones on read-heavy pages, like blogs and posts. I tracked commits on T882. The traffic subsided by around noon, and I deployed these changes a bit after.

The changes won’t totally prevent this from happening again in the future, but they should reduce the likelihood (since database connections won’t pile up so much), and should give people a better experience — now they’ll see a clear message saying that we’re under heavy load, instead of a blank browser error.

Thoughts? Discuss...

Today I’ve been working on changes needed for closing Free account registrations at the end of the month. I’ve dragged my feet on this a bit, so decided to make the “close” date coincide with the new year.

The signup flow will change a bit. Marketing pages will start talking about the platform more in terms of everything it can do (with a paid account), instead of constantly mentioning how that differs from a free account. This change alone is making things so much easier from a marketing perspective — I’m finally seeing how much effort goes into catering to free users, and making sure they understand the limitations and differences.

Otherwise, I think we’ll let everyone use the “Invite” functionality to bring people in and give them free accounts, to make sure teachers and others aren’t left out of this transition.

#dev

Thoughts? Discuss...

Yesterday I started putting together an analysis of Web3, the apparent next stage of the web, for my personal baer.works site. When I got to the end, I realized I had only outlined my criticisms without proposing anything else. So today I started writing what I think a real “Web 3.0,” in the spirit of the original Web, should be. I ended up with 2,000 words after a few hours.

Hope to publish it tomorrow on write.as/matt.

#web #web3

Thoughts? Discuss...

Trying a new morning routine lately. Instead of immediately checking email, and social media, and then sitting down to work, I’m doing anything but those things — and then sitting down only when I’m ready.

This started two weeks ago, when I was camping in the North Carolina mountains. I would get up, take my dog Holden out, feel how the weather was, and then make a pot of coffee. I’d sit for a while outside in the quiet and breeze, and see if any thoughts came. Eventually, when I felt a natural lull, I’d head to a coffee shop to start working.

I’m generally trying to find my “center” again — something I feel I’ve lost not just through recent life changes, but over the last decade, if I think about it. (That’s a digression for another time.) But I know I’ve always found my center outside, or by creating things: words, music, drawings, paintings. So without very much nature around me now, I’m doing something pointlessly creative every morning, with no real purpose or goal, before I even think of work.

The results have been very good so far. New ideas — useful or not — are bubbling up that I don’t think would exist without this kind of mental space. I’m slowly feeling more like a whole person again. And when I do sit down to work, I’m feeling a little more focused on what needs to be done — honestly, because I’d love to have more open-ended creative time.

#routine

Thoughts? Discuss...

New entry in my ongoing series on the merits of staying home, living in the metaverse, over seeing the world outside. Here I’m floating over Teotihuacán in Mexico, pretending to be unimpressed.

A selfie of me, con sombrero, looking unamused from 1000 feet off the ground, with a sunrise, mountains, and other hot air balloons behind me.

#shouldvestayedhome

Thoughts? Discuss...

Working on putting a better system in place for customer support. I’ve tried setting aside an “email hour” every day — literally scheduling it on my calendar. But the email inbox is too messy; I have a system for marking important requests but things get pushed down and out of sight; in the end it’s too overwhelming for me to sit down and get through everything in a consistent way.

I think we’ll get some kind of support ticket system in place, so there’s a dedicated area for people to go when they need help with something, and a single place I can log into every morning to go through and clear out. I’m not sure where we’ll send people that have questions before they use the product — I’ll need to figure out a sane channel for them that doesn’t get used for all kinds of other things. But my priority is keeping track of customer issues.

Today, all day, I worked on nothing but my backlog of requests — they piled up a bit after a mental break trip last week. There are still important requests and conversations I need to follow up on. It’s really not too much overall, if I took care of everything and then stayed on top of it going forward. Just need to get to that point. (If I haven’t answered your email, you should hear from me soon!)

#customerSupport

Thoughts? Discuss...

I would very much like to write two or three new blog posts at once right now, and this might push me to hack together a Draft.as prototype soon. Does anyone else have this problem?

My usual solution is opening multiple Write.as tabs, but that keeps the anxiety high. If I ever accidentally close a tab before publishing, one draft gets lost, since the editor only ever saves to a single “latest” draft.

#writeas

Thoughts? Discuss...

Nothing exists in a vacuum, and specialization is a great way to stay ignorant to the way everything interconnects.

Relatedly, I discovered a funny counterintuitive thing in college, going for my degree in Computer Science.

I was very uninterested for the first year or two of school. I'd already been programming for years by then. I'd been paid as a developer. I spent more time with friends. My grades quickly slipped. I failed a class or two. I wasn't learning anything new or putting in the work.

Many things contributed, but I started truly turning things around after taking an American Literature class and, for the first time ever, doing the assigned reading.

I fell in love with reading.

I started going to the library, walking through random aisles picking interesting-looking books off the shelf as a pastime.

I started and never finished 100 books. I'd start reading in the middle of a book, or on a page that simply caught my eye.

Somehow I always found insight from small, random passages in those pages — whether it was a book on mythology, or filmmaking, or some composer, or “weblogging,” or outer space.

It wasn't really insight into my field; just a better “sense” of things.

Soon, that actually bled into the work I was supposed to be doing.

Without trying or even realizing, I started hearing what I was supposed to in my classes. Everything was suddenly relevant — or at least, info was easier to sift through to find what mattered most.

I started getting interested. I started getting better grades. I started practices I still carry today, like taking notes to reinforce what I'm hearing in the moment (even if I never look at them again).

I got comfortable with having “unproductive” interests, and “wasting time” when there's allegedly something more important to do. It's counterintuitive, but I know now that these always feed back into the whole.

Of course, I've suffered similar periods of disinterest in the professional world. I wither slowly when I'm forced into a specialized role.

In many aspects, me starting a business has been for no other reason than to allow myself to be a generalist.

(Originally from my Twitter thread.)

Thoughts? Discuss...

I think my problem with most #marketing is that it’s very top-down, robotic and premeditated, detached and contrived. Thinking about growing my business again, I’m realizing how much I absolutely need any kind of “strategy” we use to be organic for me to feel good about it — scattering seeds instead of manufacturing a forest; forming mutually beneficial connections instead of forcing a product into people’s lives; letting things grow when people take to it, and die when they don’t.

Thoughts? Discuss...

Enter your email to subscribe to updates.