Author: Mark

  • Migrating My Blog to a New Host with no Downtime

    Migrating My Blog to a New Host with no Downtime

    My blog is finally running on a new host! I learned a lot about DNS and SSL certificates during the transition and it tickled the curious part of my brain that loves puzzles and problems. I love doing things the “right way” and “the hard way” to learn and I hope this might educate or be a good reference in the future. I aimed to do my migration with no downtime, but my website did go down for a few minutes. For that, I explained what I did wrong and what I believe is the better method.

    Why switch hosting?

    DreamHost has been hosting my blog for the last few months. I was pretty excited at first, but I’ve found their shared hosting plan to occasionally hang. This is pretty annoying, especially for a no-traffic site like my own because it makes the act of writing pretty annoying and kind of scary. It has gotten to the point where I write my blogs in a Google doc and then copy it over to the WordPress editor to publish.

    To illustrate this, I made a test! My blog is very low traffic so I value cache miss times a lot more. Also, when you’re logged in and blogging, the cache is basically disabled. To reflect this I came up with the following test plan:

    • Cold launch the website after waiting some amount of time
    • Reload the page to see its caches load time
    • Load a second page while the website is still warm
    • Reload that second page to see its cached load time
    • Wait for the website to cool down

    My trick to ensuring cache hits and cache misses was to add a query parameter that forced the page to be unique like:

    https://aggressivelyparaphrasing.me?load_id=123

    Reusing the same load ID would ensure a cache hit while changing it would ensure a cache miss.

    What I found was that DreamHost seems to keep my website warm as long as it’s been queried within 2 minutes. After 2 minutes, my website becomes cold and takes about 4 seconds to respond. In the ideal situation, my website is warm and cached which leads to consistent 0.2 second response times.

    I considered whether or not it’s worth the effort to change hosting platforms. Perhaps my blog would become insanely popular, and my users could visit it every minute to keep the website warm. Maybe I could tune the cache so that it takes longer to expire. I think that’s unrealistic and still does not solve the problem for users who are logged in as all their content is uncached and would consistently hit 2 second response times.

    Who do I go to?

    With this in hand, I was confident that DreamHost wasn’t fit for my needs, but to whom do I go? To be honest, I picked DreamHost at first because it was cheap. Since then, I’ve found wphostingbenchmarks.com reviewed DreamHost poorly but had good performance and websitesetup.org which reviewed it poorly and had terrible performance. I trusted the latter more because it aligned with my experience with poor performance so I found GreenGeeks which seems to be relatively cheap and has pretty good performance marks.

    In the end of the day, I think it’s all arbitrary what these benchmarks measure and many of them are pretty opaque. Many of them do a “load storm” style test, but what I’m having difficulty with is performance of the server when it’s not under load. That’s why I made my own benchmark in the first place, because benchmarks that other people use don’t show my issue. If I had time and this was an important decision, I’d select a few prospective hosts and run my test against each of them to make the final decision. This philosophy is inspired by the “power of two choices” for load-balancing. If you just choose the best of a few options, you’ll always avoid the worst choice. In fact, you’ll likely do pretty well for yourself. This is pretty good considering I often get stuck trying to make the best decision possible.

    Anyways, I’m not going to set up 3 new hosting alternatives. I don’t have that much time. Instead, I’ll just trust a benchmark that seems to align with what I see and go with it. In this case, let’s start with GreenGeeks.

    Backup Your Site

    First thing first, I back up my website! As a software developer, I can pretty much guarantee I’ll make a mistake and break something along the way. A lot of web development is weird, old, and inconsistent. I’ll call out some places where I messed up. If you have backups, mistakes are not that bad. Without backups, you’ll maybe lose everything.

    I personally use UpdraftPlus and added an AWS S3 bucket as my remote storage. You could probably just trigger a manual backup and then download the files. WordPress has good official docs on what you should back up when migrating, but it’s fairly manual.

    Provision a New Host

    I went to my new hosting provider and bought a hosting plan. I’m running a couple of low traffic websites so I chose the “unlimited shared” plan, which just means I can host many websites on one plan, but the resources will be shared with other customers.

    While setting up my new plan, I allocated a “service” which I think is just a slice of a server. This service will have one static IP address, though that IP address is probably shared with other websites as well.

    For my new service, I add a primary domain and set up a WordPress instance for that domain. Because I’m running multiple websites on my one hosting account, I need to add the additional websites as “addon” domains. Addon Domains are just cPanel terminology for VirtualHosts. One web server (machine / IP+port) can serve many websites based on the “Host” header sent in the request. cPanel creates a subdomain, subdirectory, and separate virtual host to serve all of this. I suspect the subdirectory and subdomain are implementation details as NameCheap suggests.

    So all in all, I have a shared hosting plan with my primary domain (aggressivelyparaphrasing.me) and a few addon domains for the other sites I run.

    Connecting to the New Host

    While the server is configured to serve my domains, I haven’t configured the domains to point to the server. I haven’t done so because I don’t want this new server to be live to the world yet. I found the fastest way to connect to a website that hasn’t had DNS set up yet is through CURL.

    curl -H "Host: aggressivelyparaphrasing.me" \
    http://184.154.47.42/

    This CURL command connects to the IP that the new host is running on, but specify the Host header for the website. This is what the client would do anyways if DNS resolution was set up and is part of the HTTP spec. This method will not work with HTTPS because the Host header is part of the payload and the client needs to supply the hostname as part of the handshake to get the proper certificate first. That requires the host selection to occur as part of the TLS handshake via Service Name Indication (SNI). But for now, since we’re http only, this works fine.

    Another way to accomplish this is to use the --resolve flag to add an entry to CURL’s DNS cache. It even supports HTTPS if you add port 443 instead of 80:

    curl http://aggressivelyparaphrasing.me/ \
    --resolve aggressivelyparaphrasing.me:80:184.154.47.42

    From curl, I should see a new fresh WordPress install with my name on it.

    To interact with this website, I found that /etc/hosts hack to be a bit difficult. Not only is sudo required, but a reboot as well for macOS. This makes things difficult when swapping between the two. Instead, I decided to use a Firefox plugin FoxyProxy to proxy the requests through the new machine.

    1. “My Website” IP + port 80.
    2. *aggressivelyparaphrasing.me* (wildcard) HTTP
    3. Use enabled plugins by patterns and order
    4. Had to disable browser.fixup.fallback-to-https in about:config. Kept upgrading to HTTPS which wasn’t set up yet.

    With the FoxyProxy plugin enabled, go to the domain and it should resolve.

    Set Up HTTPS SSL Certificate

    I made the mistake of migrating content before setting up HTTPS SSL Certificates. I’d recommend setting up the certificate first. My WordPress is configured to redirect http to https, so when I restored from a backup, I couldn’t get past the SSL handshake. I know this because when I run the following CURL to show verbose output including headers, I see the Location header pointing from http to https.

    curl http://aggressivelyparaphrasing.me/ \
    --resolve aggressivelyparaphrasing.me:80:184.154.47.42 \
    --verbose
    ...
    < location: https://aggressivelyparaphrasing.me/

    Update from Aug 2 2023: I was able to get around this in a subsequent migration by setting my WordPress > Settings > General > WordPress Address (URL) and Site Address (URL) to replace https with http. While this worked, I would have preferred setting up SSL first because I needed to change this back afterwards anyways.

    To resolve this, I had to install an SSL certificate for my domain onto the new host. If I use the traditional Let’s Encrypt process, it’ll fail because DNS is not pointing to the new host yet. The traditional challenge is to create a file in a well known path on the host to prove you own the machine and the domain, but that doesn’t work when the domain points to an older machine. I need to do an alternate challenge. I do not want to change my DNS to point to the new host yet because that would make my new host live and I haven’t finished migrating content or tested yet. Instead, I can add an Name Server (NS) records to my DNS for the _acme-challenge subdomain to prove I own the domain.

    Using the option that sets the _acme-challenge Name Server (NS) records is pretty straightforward but required me to wait for DNS propagation which took a few minutes. Additionally, I had to “resume” the process because it failed the first time waiting for me to set up the records and verify my email.

    Once this is all set up, I can verify with the following command that is set up to connect to the new host over HTTPS which uses port 443.

    curl https://aggressivelyparaphrasing.me/ \
    --resolve aggressivelyparaphrasing.me:443:184.154.47.42

    CURL worked great for me but FoxyProxy stopped working at this point. Unfortunately, I don’t think it’s really feasible to “proxy” the HTTPS connection through the new host. Firefox does not trust this site because it uses a certificate that is not valid for aggressivelyparaphrasing.me. The certificate is only valid for the following names: *.greengeeks.net, greengeeks.net. This is a clear sign that we’re not sending the service name. Running the following command without the servername flag gives me the GreenGeeks cert, and with the flag gives me my own, validating my thoughts.

    openssl s_client \
    -connect 184.154.47.42:443 \
    -servername aggressivelyparaphrasing.me \
    -showcerts

    At this point, I’m done with my old website so I’m abandoning FoxyProxy and editing my /etc/hosts file. After disabling FoxyProxy, adding 184.154.47.42 aggressivelyparaphrasing.me to the bottom of my /etc/hosts file, and rebooting, things work great!

    Migrating Content

    Now that we can work with the new website so let’s migrate content. WordPress has good official docs on what content to copy over, but since I already have backups, I decided to just restore from the backups. I just install the plugin manually first and proceed to upload my backup files to start the restore process.

    Unfortunately, the plugin rejected the restore because I needed to:

    Once all that was done, I finished the restore and now it’s time for me to verify the restoration!

    Check Things Work and Fix Broken Stuff

    For me, and probably for you too, visiting http should redirect to https. So I just loaded up the curl command and watched the redirect flow through. I also verified from the output that my real site is present.

    curl http://aggressivelyparaphrasing.me/ \
    --verbose \
    --location \
    --resolve aggressivelyparaphrasing.me:443:184.154.47.42 \
    --resolve aggressivelyparaphrasing.me:80:184.154.47.42

    The above command should start with http. The server will send the location header to https. From there, we should connect, do a TLS handshake using the correct certificate for aggressivelyparaphrasing.me, and then see the content of my restored website.

    Next, used my browser to visit the website and ran the site health check through WordPress. It reported the Imagik PHP module was not installed so I installed it using cPanel.

    Clicking around my blog, I notice that featured images are displayed at the top of all posts, even though I intentionally hid them on my site. Visiting my old site, I noticed I configured it under Content options to hide featured images. On my new site, I’m unable to access Content Options from my theme to disable features images. I’m not sure what the discrepancy is here and there’s probably an interesting bug to dig into, but I just added some custom CSS to do the job and moved on:

    .post-thumbnail {
        display: none;
    }

    The last issue is the backup cron hasn’t ran. Highly suspect given one of the common issues is with the “loopback url” as that is how wordpress schedules work for itself. I was able to trigger a manual backup so I know the functionality works, it’s just the trigger that runs every morning was failing. I figure this would resolve itself after updating DNS. In retrospect, one way I could have verified this before jumping to updating DNS is to edit the /etc/hosts file on the server and then checked if that fixes the cron schedule. However, I’d probably want to undo the edit to the /etc/hosts file later anyways.

    In any case, it’s time to move on!

    Update DNS and Make Things Public, What I Recommend

    At this point, I’m ready and willing to just transition to the new host. Everything seems to work pretty well except for some things that rely on the DNS to be up and running.

    The ideal transition would be fast to switch through and is reversible in case things don’t behave as expected and we have two options: (1) in the registrar, change the nameserver or (2) in the nameserver, change the A-record.

    Every host I’ve used so far recommends changing the nameserver, but I really don’t agree. I believe this is because it is an easy change and the new host can automate and control their own nameserver to say anything they need to if you need support. However, nameserver TTL usually is set to hours; mine is set to 6 hours. Additionally, I don’t think most registrars allow you to set the TTL.

    For a quick migration, it’s best to just change the A record. You can set the TTL to something low like 5 minutes ahead of time. Then, later on, you can just change the IP address real quick. Once things are confirmed working, you’re done! The cut-over period will be 5 minutes, and the risks of failing here are pretty low because of all the testing already done. Still, there’s always risks like how we had difficulty renewing our SSL certs and with the backup cron so it’s nice to be able to swap back your A record to the old IP to undo any damage you might have done.

    So here’s my recommendation: register your domain somewhere separate from where you host your website. Use your registrar’s nameservers and point the DNS records to your web host yourself. I had this big fear that my web host should manage my DNS records in case the IP address change. I realized this is an unrealistic situation now and I was confusing “dedicated IP” with “static IP”. You will have a static IP, it will not change on you. If it does, your website WILL go down for at least a few minutes which is unacceptable anyways.

    If I had used my third party registrar as my DNS host, I could have replicated the DNS records from DreamHost in my registrars DNS zone editor. I could change the TTL of the records to something low like 5 minutes in preparation for the cutover. Then when I flip the A record to my new host, everything should cutover in just 5 minutes.

    The hardest part of this flow is switching from my web host’s nameserver to my registrars nameserver. This isn’t a problem if you had always used a third party nameserver as there’s nothing to change. However, changing nameservers takes forever because those records tend to have really high TTLs, making them take much longer to expire out of caches.

    To query for the TTL of my NS records at the TLD level, I used: dig aggressivelyparaphrasing.me +trace. It will spit out a lot of response, one for each hierarchy of the DNS resolution. We can ignore the first few blocks where we list out the root servers, then we query the TLD servers. Below is the part where we see the TTL of the NS records for aggressivelyparaphrasing.me and they’re set to 1 day (86400 seconds). After that is the actual A record that says the IP address where my website lives.

    dig aggressivelyparaphrasing.me +trace
    ...
    aggressivelyparaphrasing.me. 86400 IN	NS	ns1.dreamhost.com.
    aggressivelyparaphrasing.me. 86400 IN	NS	ns3.dreamhost.com.
    aggressivelyparaphrasing.me. 86400 IN	NS	ns2.dreamhost.com.
    ;; Received 622 bytes from 199.253.60.1#53(b0.nic.me) in 28 ms
    aggressivelyparaphrasing.me. 300 IN	A	184.154.47.42
    ;; Received 72 bytes from 162.159.26.14#53(ns1.dreamhost.com) in 35 ms

    The TTL for my NS records is a pretty reasonable amount of time to wait after changing my NS records for all the caches to expire it, but you can also verify by checking a tool like https://www.whatsmydns.net/ to see the value of various DNS responses around the world.

    Once the new nameserver has all the records I need transferred, I can do a few test queries to make sure the DNS records look identical. I can then adopt the new nameserver in my registrar which will take that long NS record TTL time to porpogate and settle. After waiting that time and verifying against some DNS resolvers, I can finally edit the apex (@ or aggressivelyparaphrasing.me.) A record to point to the IP address from my new host.

    One weird thing is that all Fully Qualified Domain Names (FQDNs) end in a dot (.) but some hosts hide it, while others expose it and it can sometimes be hard to tell what to do. GreenGeeks has a warning for when you do it wrong, while DreamHost has a fancy UI to coerce you to do it right. You can see this, for example, if you run dig NS google.com (or use the dig webapp):

    ;; ANSWER SECTION:
    google.com.		83354	IN	NS	ns1.google.com.
    google.com.		83354	IN	NS	ns2.google.com.
    google.com.		83354	IN	NS	ns4.google.com.
    google.com.		83354	IN	NS	ns3.google.com.

    What did I actually do? I accidentally took down my website!

    While my advice above for using a third party nameserver sounds all fine and dandy, I didn’t actually do it. I was still using my old web host as my DNS host as well, since that’s what they recommended. The problem is they configured it to be “fully hosted” meaning they manage the whole shebang. When I went in to change the A record for my domain, it forced me to delete my web-hosting content which I thought was sad and ridiculous. It’s way to easy to accidentally lose all my hard work, especially if I didn’t make any backups.

    The website for this domain must be deactivated before root-level custom DNS records of this type may be added. To configure a different subdomain, enter it in the Host field above.

    ‘Fully hosted’ domains have several non-editable A records. Setting a domain to ‘DNS Only’ removes the following system records: (1) non-www A record, (2) www A record, (3) ssh A record, (4) ftp A record.

    Are you sure?

    Please note, this will not deactivate or cancel the hosting plan itself. It does not delete hosted files nor does it remove any existing custom DNS records on the domain. Other services, such as email and MX records, are also left intact.

    The domain can be set back to Fully Hosted from the Manage Websites page.

    In a panic to get things running quickly again, I pointed the apex (@) A record to GreenGeeks IP using DreamHosts DNS Zone editor. This is super weird because I’d lose access to editing the DNS zone on DreamHost nameservers once I cancel my plan, but it worked in a pinch while I was sorting out the mess.

    To test, I remove the DNS entry from /etc/hosts file and reboot. Thankfully the TTL for A records in DreamHost were already configured for 5 minutes so I only had about 5 minutes of downtime.

    Final checks

    Make sure you can renew your SSL certificates with the new DNS configuration. It should actually work better than before because it’s pointed to the proper host.

    Also, it was a guess that updating DNS would fix the backup cron, and it did, but it’s good to double check.

    What about that benchmarking I did in the beginning? It worked! My page now consistently loads in about 1 second without caching, and in about 0.3 seconds with caching. This compares to 4 seconds uncached and 1.5 seconds cached.

    While DreamHost was able to serve requests within 0.2 seconds in the ideal case, I rarely triggered the ideal case. I found having consistently decent performance of around 1 second to be much better than having performance sometimes be 0.2 seconds and sometimes 4 seconds.

    Was this worth it? Kind of. It was fun to strategize and learn some of the nitty-gritty details, but my blog currently isn’t serving any value yet so I could have probably saved myself several hours of work by just doing it the dirty way. Still, I’m happy my blog no-longer takes 4 seconds to load most of the time.

  • Resorts are kind of weird…

    Resorts are kind of weird…

    “No one drank Cacique back then. It’s so hard and bitter. Now it’s mixed into everything, even our rice and beans!” As they sip their cocktails, the daughter laments how Cacique, their national liquor, was not a thing 10-15 years ago. Across from us are a Costa Rican (Tico) mother and a daughter who grew up in Florida. The mother laughs about how silly some things became, but hey, a good drink is a good drink!

    With us are three managers of the resort, here because: “as managers, we don’t get to interact with our residents very much and it’s good to feel the appreciation and pride of serving our customers.” My partner Jenny and I signed up for “cocktails with managers” because we wanted to know the types of people running this resort. You can tell they’re managers because of how they dress: a loose button down, slicked back hair, and an Apple Watch. No one here has iPhones, let alone Apple Watches, simply because it’s too hard to live here with a standard salary. “Mark worked on the first Apple Watch!” Jenny tries to kickstart the conversation as the managers stare listlessly at the pool. A manager lights up and tells us he loves it for meeting reminders and sometimes uses the Mickey Mouse screen to take him back to his childhood. He thanks me for my work and then goes back to talking about the business with lofty ideals like their dedication to their core pillars: community and sustainability.

    “Community?” That’s rather strange, I feel like the resort is actually really far from the nearest community, about a 20 minute drive through a lot of empty land. No one lives near here and there definitely aren’t any sodas or restaurants here. It kind of reminds me of life at an up and coming startup: insular and detached from the outside world but with a lot of internal hype to make everyone feel good.

    “Yes! We love pushing for entrepreneurs, to up-skill staff and support their transfers wherever they want.” Most of the talking is done by the head honcho. He’s new to the resort but has been in hospitality for over 25 years and has worked all over the place including Panama and Nicaragua. Compared to him, the other two managers have been around for much longer: 12+ years each. A lot of people who work here have been here for so long. The receptionist joined 6 years ago as a security guard but transferred to avoid the rough schedules which alternated between day-shift and night-shift on a day-by-day basis. The receptionist explained how happy he is to be sitting in a shaded cabana greeting guests from 6am to 2pm every day. “I can go home and see my family for the afternoon and it’s nice to be able to sleep normally.” It kind of reminds me of my previous corporate job where some people just stick here for life. Definitely not my idea of entrepreneurs.

    “So do you work here at the restaurant?” I know, it’s awkward, asking an employee if he works here. We’re running out of topics and they’re not giving us much personality to work with. “Yes! I’m here often actually. I spend about 1 hour every day here.”

    Wow… For such a community oriented team, I was quite surprised how distant the manager is from the staff. “I spend a lot of time on zoom meetings though.” Perhaps those distant managers really are just a fact of life, or maybe it’s something inevitable with a larger organization.

    Near the end of our time, the head honcho apologizes and says he must go attend to something else now. We all shake hands and smile. The other two managers don’t even address us and disappear into the jungle. Did they actually want to be here? Jenny and I lounge for a bit before heading off, where we stumble across the managers having their own little conversation. I wonder what they had to address? We wave at them and bode them a buena noche.

    The head honcho thanks me for his Apple Watch, again.

    To Give Back, First You Must Take (A Selfie)

    My alarm goes off at 8AM reminding us to walk down from our room to the front desk, where we meet with concierge who wears a button down blouse, pencil skirt, and heels. She greet us and lead the way to the garden, where the lead grounds keeper introduces himself and talks about today’s activity. Through a translator, he explains that we’ve signed up for the “plant a tree” program that enables patrons of the resort to contribute to the resort’s overall environmental sustainability and reforestation efforts. I love nature, trees, and gardening so this was right up my alley! After a bit of chit-chat and Q&A, I grab my selfie stick and the shovel and get to work. I dig a small hole that they had marked for me and plop the tree sapling that they had prepared for me. As I walk towards the pile of dirt I just dug up and prepare to shovel it back onto the plant, the gardener motions me to use my hands instead, and grabs the shovel out of my hand. The cold, soft, rich dirt was very light and airy in my hands, nothing like the hard dry clay of California. Here, everything is covered in a wet grass.

    Time-lapse of us gardening at the resort, planting trees! Around us, you can see a dozen other saplings that were planted over the last few weeks.

    They give us plaques to tag our freshly transplanted saplings: 22-68 and 22-69. The first number is for the year 2022, and the second is to identify our specific plant, the 68th and 69th. How many trees they plant every year? “About a hundred, but it depends on the year. COVID-19 really disrupted us last year.” Where do these trees go when we’re done? “There’s a special area at the edge of the property that we are reforesting. You can email us any time with your number and we will find the tree and send you a picture,” our concierge said with a smile.

    Just us having fun 🙂

    All in all, it was a little strange but quick and fun exercise for us. Strange because I kept wondering how this reforestation project is actually working out and what will happen in the future. Will the plants survive? Maybe I should set a reminder to email them every year. But also, what is this actually doing for the deforestation that they’ve already contributed to? They cleared the land, paved over much of it, built structures over other parts, and manicured the surrounding areas into a sparsely natured ground. There are trees here and there, lots of native plants and flowers, but it looks far too picturesque compared to the jungle that was once here. It really makes me wonder, is this reforestation project actually good? Or is it just better than nothing? Was there more to the sustainability that the head honcho mentioned than this?

    We’re in a spaceship and going to the moon!

    I used to work at Apple. “Oh, hows the spaceship building? I heard it’s amazing!” Whether I’m in San Jose, Costa Rica or San Francisco, California, questions about what I do for a living always go down this route. Apple emits an overall opaque and mysterious aura that piques curiosity. Their campus is no different. Steve Jobs pitched the new office suite in 2011, just a few months before he passed away. In the decade later, they bought up the entire previous HP campus and had a lot of pitches about how good they were doing. They left as many trees as possible from the previous HP campus, which is noticeable from the outer perimeter made of older redwoods towering dozens of meters in the air. They talked about how many trees they would plant all over the campus and how the irrigation would take advantage of the natural slope of the terrain, slushing rain water from the streets, through all the foliage, and then down to the neighboring creek. The parking lot and main buildings would all have solar panels to power their own micro-grid to ensure most building operations are energy neutral. The floor to ceiling windows/walls of the spaceship incorporate automated flaps that allow outside air in through filters if the temperature outside is desirable enough, reducing dependency on HVAC. To ensure minimal impact on the neighboring areas, they added a transit center away from the main freeway entrance, widened the freeway exits nearby, and added some bike lanes to the perimeter of the region. I really do think the building is a really great example of civil engineering and building ecologically sensitive buildings.

    Steve Jobs explains that the original HP Campus only had 20% of it’s surface landscaped. Apple Park will have 80% landscaping. From his presentation to the City Council of Cupertino.

    However great the thought to Apple Park was, I think they’re viewed in a very narrow scope and context of environmentalism that Apple pushes. What about supporting the local community? There’s a plaza literally across the street from Apple with the “main strip” on the other side of the freeway. Unfortunately, their competition now includes the subsidized Apple food which is incredibly fast, nutritionally balanced, and delicious. It’s sad, but the choice is either to walk 500 feet to an exclusive cafeteria that’s where food is at-cost or walk 1000 feet to a community restaurant at market value. In this, Software Engineers are the stingiest people in the world. Give someone half a million dollars and they will pick pennies off the floor. Lunch may “only” be subsidized, but there is the evening dinner stipend which starts at 7pm, where engineers get $12 of dinner in any of the cafeterias. Here, you’ll find engineers who lined up for 30 minutes ahead of time waiting until 7pm to get their $12. Every evening.

    Lamb Shank over mashed potatoes and roasted carrots. Free to software engineers at Apple Park.

    If you’re an Apple fan and you want to see how great the building really is, good luck. Apple doesn’t want you there. They built a really nice visitor center just outside the perimeter, across the street to ensure adequate separation of guests and members. The visitor center has a great view of the towering redwoods that block. Any view of Apple Park itself. If you try to cross the street, you’ll be flagged by security for not badging in or you’ll be trapped in the transit center. What you do get to see, if you want to see Apple Park, is a pretty cool VR model of the campus via an iPad. Mhmm. Otherwise, it’s just another Apple Store.

    The new Apple Spaceship is located right off the freeway exit in Cupertino. Where is Cupertino? It’s a suburb located just outside of San Jose. There really isn’t anything in Cupertino aside from Apple. It’s a bedroom community, a place for people to buy homes and will commute long distances to get to their work. It’s an expensive community with very well-rated schools and highly competitive housing. A friend of mine said in his apartment hunt, most land lords will allow you to sign the lease remotely because most tenants won’t even look at the unit before signing on. The tenants main goals is to get into the zip code of their ideal school, nothing else matters. The name of the game in Cupertino is exclusivity.

    City leadership and representatives joke about building walls around the city to keep the neighboring city dwellers out. If the city doesn’t build enough walls, its citizens will settle for their high fences to at least not have to look at their next door neighbors.

    It’s not just Apple, building utopias in suburban or remote locations is a general sentiment of big tech. You see this with the main Google and Facebook campuses where they built them up in old industrial wastelands that really do not have the infrastructure or community to support them. What you get is a community that is separated from the rest, an isolated micro society. You visit these types of compasses and you’re greeted by thousands of tech workers who get to enjoy their free lunch in plazas surrounded by walkable communities and game rooms and bike paths to take them where they need to go. They have free shuttles that run them all over the place with dedicated roads and tunnels to get them past traffic. They have entire parks built in these pseudo-gated communities. It’s like a tiny Disneyland including the tram. They’re resorts — all inclusive.

    Sunsets are the same everywhere, but open spaces full of nature can be hard to come by. To have this be my evening view is a privilege.

    Cash Rules Everything Around Me

    I grew up poor. I remember that feeling in elementary school when other students had lunchables and all I had was a hotdog wrapped with a slice of bread. The jealousy when everyone comes back from the summer break with tans and stories of their adventures across California visiting their relatives, excursions in the great outdoors, or in a foreign land that I could not even fathom. I envied those who had supportive parents who budgeted for music classes, or were shepherded to sports after school. I grew up deprived of this kind of development, growth, and happiness. I was silo’d into the room I shared with my cousin, where we found solace in video games.

    It’s an ongoing struggle for me to outgrow my deprived childhood. There are a lot of “poor habits” that I carry today that come from twenty-something years of being left alone, homeless, and neglected. I have difficulty feeling hunger. Even worse, I do not feel full. This comes from a childhood where my hunger did not matter, because food came on the table whenever it was available. No one ever asked me if I felt hungry and wanted to eat, because the answer did not matter. I also carry the burden of never complaining. Many of my relatives and acquaintances think I’m nice, quiet, and obedient but I look at myself and see someone whose values and opinions never mattered. I was never asked and taught to introspect and figure out what I wanted, because what is the value of wanting something if we could not have it? The strongest moral I was taught was to never get in other peoples way; expressing my needs just burdens those around me.

    I also have difficulty with the opposite: rejecting something I do not want. I have difficulty saying no to people, pushing food that I do not enjoy away, or expressing discomfort about something going on. At work, someone described using his phone without a protective case as “going bareback” and the only reaction I could muster up was to stare at the ground in silence and awe that he could just say something so profoundly uncomfortable with such casualness. Relief rushed over me when a manager called out that it was not a work appropriate comment. Other times, I have difficulty expressing when I don’t like food at a restaurant. It took a lot of reculturalization for me to tell the waiter when something was undercooked, overcooked, or too salty. Even to this day, the discomfort from expressing my unhappiness makes me feel like I’m ruining their day. But I’ve also lived my whole life sitting in discomfort, and ignoring my own feelings and opinions to avoid casting discomfort onto others. Now that I have a lot of experience cooking, I realize by not voicing my discontent or praise, I’m depriving those around me from critical feedback that can guide them to improve themselves. It’s really their choice to listen to it or not. It’s only through therapy and diligent practice of meditation and being present that I can prioritize myself and gain agency in my life instead of living my life around my assumptions of other people.

    As an adult, I’ve grown to reach upper middle class and that is a true testament to the abilities that America still can afford the American Dream. I was pretty average in my primary education and was at-risk in my early college years, but hard work, discipline, and luck all played a part in my success in breaking the generational shackles of poverty that I was born into. Although I grew up poor, I no longer spend my days feeling jealous of others for their lives. I thankfully have a loving partner who shepherds me to love myself and experience life more. I’ve also had many friends who taught me how to out-grow some of those “poor habits”. I learned to use the dishwasher, to turn on the heater in the winter, and to feed myself nutritious food instead of convenient fast food. Today, I pursue my creative and artistic passions that I spent so many of my early years suppressing.

    I can’t help but see through a dark veil of negativity that shrouds higher end hospitality. I look at the menu of the 4.1 star restaurant at the resort and all I see are strange and expensive dishes: a $170 tomahawk steak that you grill on lava rocks, $40 rack of 4 lamb ribs over saffron risotto, and $20 appetizer of asparagus with hollandaise sauce. While I don’t like paying more than I need to, I do support paying people a living wage. I also keep in mind what a living wage is in Costa Rica. In speaking with our tour guide, he shared that the average Tico salary is around $25 per day, $750 per month, or $9000 per year. Beating the average is a pretty good life here, but being average is tough. People aspire to get into roles such as servers at restaurants or security guards at parking lots because they get tipped pretty well during high season, even if their salaries are low, earning them a income of $50 on a good day. Some people look for these seasonal jobs that can pay a lot in one go while others seek a more stable way of life, joining a large tourism company that provides them with benefits, a stable salary, and maybe a week or two of vacation per year.

    What I see in the divide between how much this resort costs versus how much people get paid is that most of the money goes back to the investors. When I see a restaurant that is able to charge $16 USD per plate in Costa Rica, it is because a foreigner has arrived and built themselves a little investment. These foreigners are the people with the most privilege who can claim with confidence that their product deserves twice the money as everyone else. They’re the people with enough capital to pull off risky operations like opening a hot spring resort in the middle of farmland. So when I spend money, I think about who it’s going to. Is my $170 tomahawk steak going to the chef or the cattle rancher? If I’m spending money, I hope it enriches someones life rather than topping off the bank accounts of an investor.

    Back in the US, I frequently struggle finding the right places to put my money. I think if it as Bezos versus brick and mortar. My personal philosophy is to prefer supporting local individuals or small businesses as much as I can as long as it’s still within the realm of reason and they are providing at decently good business. How? When looking for a place to eat, I prefer Yelp’s “Hot and New” filter to try out places that are still trying to get their footing. When I have a negative experience with someone or something that is still trying to figure itself out, I give them all the types of feedback: gratitude, evaluation, and advice. I prefer to not write negative reviews without letting them have a chance at rectifying it, but it really depends on their reaction. To me, it’s making a diverse amount of people competitive and successful.

    It’s all a show, but don’t pull the curtains back

    The hospitality industry is theatrical — the whole symphony of people serving their customers by doing the utmost, going above and beyond to satisfy our needs. I have very mixed feelings about this.

    Our first night at the resort was pretty nice! We checked in and they were very supportive and transparent with what was available and where we were staying. We lucked out being sandwiched between a storage unit and an empty unit, so we were able to sleep super soundly that night. The next day was pretty nice too! We enjoyed the hot springs down the road and had some delicious breakfast! Pinto gallos are a new staples I hope to incorporate into my regular cooking routine into the future! We went offsite to a local restaurant (soda) and an adorable older lady welcomed us and fed us such delicious plates!

    Having fun at the resort hot springs!

    Things fell apart the second evening. That empty room next door was now occupied by a family: a couple of adults who liked yelling or talking loudly, a few kids who wanted to watch TV and jump on the couch into the evening while playing and screaming at each other, and at least one older individual who would not stop coughing. It’s a dynamic we see often where there are too many adult parental figures (grandparents plus parents) and they all absolve their responsibility for their children and delegate it to each other. All this leads to is children screaming and causing a ruckus, disturbing anyone else who wants to enjoy a good night’s sleep.

    As this is a service industry, our happiness is their product of sale. If we’re unhappy, we didn’t get what we wanted. So we complained! We told the front desk the situation and what we’re dealing with, and asked if there are any other rooms. Additionally, they offered $50 for each night we stayed—$150 total to use at their own restaurant. We were enjoying the local soda’s (what Ticos call restaurants) but gave it a shot because hey, it’s free.

    We ordered the oysters to start. What we got ended up being pretty fishy and we had a lengthy discussion on what fishiness is and why it’s bad. We debated our different life experiences with fishiness: my cultural roots in Vietnam where we douse so much food in sweet watered down fish water, and my partners of getting food poisoning multiple times from fishy oysters. I explained that I don’t think fishiness is bad by itself, but there’s two things that make me second guess seafood. The first is if it’s slimy and sticky, I’m not talking about general fish texture, but I mean when something is suspiciously not fresh and feels like it’s been sitting around for a bit of time. I find a day or two past it’s prime, seafood gets a bit soft and doesn’t have that meaty sensation that pushes back against your teeth when you bite. The second hint that something has gone awry is when that fishiness sits in your mouth. With sushi, I use the ginger and wasabi as a palate cleanser to wash away any lingering sensation of the sea in my mouth between each bite. What happens with older fish is that flavor, the sticky slime, and the pungent odor stays in your mouth and tinges everything you eat thereafter with a carpet of the sea.

    And so we didn’t finish the oysters. We started the dish, gave it a few attempts, and left most of the oysters untouched. In the past, I would have either eaten the rest because of my previous eating disorder, or I would have just silently left the food sitting on the table and just excused my lack of appetite to avoid any confrontation. Obsessive eating and avoidance are both negative behaviors that I’m working hard to fight against, so today we agreed to stop eating and tell the waiter.

    When the waiter checked in with us to see how we were doing, we told him that we were unhappy with the dish. “It was too fishy for us.” The waiter’s reaction was quite interesting: “okay, what else?” Hmm, I’ve never seen that reaction before. It’s neither accepting or rejecting, just buying time I suppose. My partner was generous, offering that it could just be regional: maybe the oysters of the Caribbean have a stronger flavor like lamb is more game-y, or maybe our experience shucking oysters off Tomales Bay in California has given us unreasonable standards for freshness. Whatever it was, it was our opinion that it was too fishy and that comes from our background growing up eating oysters and getting food poisoning whenever it had a strong fishy flavor.

    The waiter’s reaction to our feelings? “Well, to me these are good oysters.” This seemed defensive. It’s denying another person’s perception of the same reality. By bringing up their own contradictory opinion, they’re trying to discredit ours. We are all living in our own worlds shaped by our own perceptions and experiences. It’s pointless because we were unhappy with what we got, and even if he was happy, it doesn’t matter. He’s not the one paying with unmet expectations. Our opinions are not facts, but it’s pointless to not acknowledge a customer’s dissatisfaction when you work in hospitality.

    My therapist talks a lot about taking actions that benefit myself while ensuring my happiness comes from within. She focuses on how my actions should be things I want to do, and that the reaction of others are often a reflection of their own journey and state of mind. It does not excuse myself for behaving like an ass, but it’s healthy to be slightly disconnected from other people’s emotions. Otherwise, you give them power over your own happiness. This was a clear example of their reaction being unexpected and a good opportunity or me to practice distancing myself and standing up for my own beliefs.

    What really sealed the deal was during checkout, we were told that we only had a $50 credit on our account, and we still owed $89 for a meal we neither liked nor wanted. For that price we could’ve had 5 hearty meals at the soda’s in town. It feels wasteful, like when you return merchandise at a store only to get store credit that you’ll never use. It keeps you trapped in a system when you are most upset and the only escape is just to just surrender and leave.

    Plant More Trees!

    It’s hard to know how to fix all of this. I don’t have a sustainable example where a society is both large and does not have incredibly large power and quality of life imbalances. We can look at individual problems like the carbon impact of construction and say we should plant more trees to compensate, but the reality of reforestation is that it’s largely a failure. Trees either grow naturally over time or they grow quickly artificially, but artificial growth requires ownership, time, and maintenance. It requires someone to steward the saplings and ensure that diseases don’t spread across monocultures, that storms don’t wash them away before they get a chance to root down. It requires that the saplings are planted in the ideal ecology of nutrients, water, and sun, or all that is provided to it during its most sensitive years. Planting a seed takes seconds, but trees take decades.

    I believe Apple’s private park will be a success because they have an arborist on retainer and an expert gardener to manage their meadows. They have the irrigation infrastructure to support the entire park, making sure that the California drought does not impact them too aggressively. Their ecology is both diverse and drought tolerant and you’ll frequently see the flocks of duck, crows, geese, squirrels, bunnies, and any other smaller critters you’d expect in that area. Deer? Never. The security guards won’t let them in.

    Nov 2018 had intense wild fires but Apple Park is essentially sealed from the outside world so that doesn’t matter. Engineers enjoy the comfort of climate controlled and sanitized air with beautiful views of trees and nature.

    During my time in university, I remember there was a very old tree that was struck down by lightning during a crazy storm. It was definitely the El Niño year so probably around 2012. The tree was situated within a round-about and grounds keeping crews were very quick to come over and trim it back so that students could continue biking to classes. It laid on the mulch split in two for about one day before being replaced by what looked like an identical, completely healthy tree. Where did this tree come from? How did it grow so big? Was this tree just sitting around somewhere waiting to sub in when a fellow tree drops out?

    I still think UCSB has the ideal lifestyle bikes being the main mode of transport and where students lived within a mile of their classes, jobs, and recreation.

    What of the little saplings planted at our resort? The gardener told us they would leave the saplings where they are for a few weeks, maybe a few months, for it to adjust to the local climate, and then dig them up to move them towards the edge of the property where they will find them a more permanent home. They told us that we’re planting are two local species: one is from the north that is primarily harvested for wood but they hope it will grow well here to provide a good perch for birds to nest in, and the other is a beautiful blossoming tree that provides a lot of shade for different animals like sloths and toucans. This biodiversity I hope will give the forest more of a chance at surviving any diseases and providing what the local ecology needs. At the end, we gave the trees a little numbered plate so that we can check in on the plant and see how they’re doing. I truly wonder how many people just do this for the photo op and never come back to check. Unfortunately, the best reforestation projects I’ve seen seem to be the ones that are exclusive and private—the ones that have rich people “donating” trees with their names on them and then having other rich people pay to enjoy the experience.

    A selfie with us and the gardeners of the resort.

    Living in Neverland

    So here we are at a resort where we were charged for dissatisfying food that we were encouraged to eat as compensation for a room we could not sleep in. This place is unique in that you can attend the hot springs if you pay admission, but that’s not generally the case for resorts. Many actively try to discourage you from beach access even though it is required to be public by law in most states in the US. They try hard to be exclusive, pushing people away to drive up prices, but here I am being pushed away.

    We lost a pair of sunglasses, so an employee put on snorkel gear to search all the ponds to find it. It felt silly. We’re pretty sure someone stole them.

    It’s weird seeing modern day servitude. A lot of the gardeners are doing back breaking labor that would not be tolerated in the US, but these people are just raking and shoveling. Everyone is respectful and polite, but few seem to genuinely be happy. Most of the smiles have a tinge of pain behind them, the wrinkle of hard work and old age after being forced to smile for so many years.

    Was this a nice relaxing break? Not really, no. The hot springs were really nice and definitely the best part. I’m glad I went and I’m glad it’s behind me, but there’s too many negative aspects of society that I see ingrained into a resort like this. It’s hard on me to contribute to it. Maybe what I’m feeling is that “poor habit” of never inconveniencing others and staying out of other peoples way?

    The views were amazing, but you can’t escape the chaos of nature and other people disrupting your life. Why expect it at all? Sound on.

    I think what resorts provide is an escape from our day to day realities. It’s a controlled environment where everything is manicured and perfect. A Disneyland where all your fairy tail dreams come true, where all your favorite attractions and accommodations are within walking distance, or connected by a beautiful and prompt transit system. You just have to replace an actual rail system with a collection of golf carts driven by resort staff. Resorts provide a way for people to exercise a privilege most were never born with, a privilege that allows you to satisfy all your inner needs and desires at the mercy of another being. Maybe we could take a little bit of the resort utopia and build it for our normal day to day lives, minus the servitude. Maybe it would let us all enjoy life a little bit more regularly.

    Or maybe we should all just be riding golf carts.
  • Mashed Cassava

    Mashed Cassava

    I ate mashed cassava for the first time and it’s pretty amazing! I was expecting something pretty similar to American style mashed potatoes, but with a little Costa Rican twist. It’s savory and fun to eat, but it also inspired me to learn a bit more about cassava and the history of Costa Rica.

    Me with a huge smile serving a fork with a bit of mashed cassava on top.

    While I was expecting something like mashed potatoes, mashed cassava is surprisingly gummy and soft in a way that reminds me of warm mochi (mashed glutenous rice) and poi (mashed taro). It feels just a little bit sticky and chewy but still very easy to eat bite by bite.

    My experience with cassava is very Vietnamese oriented because, well, I’m half Viet. San Jose, California has the largest concentration of Vietnamese outside of their home country which gave my childhood a strong sense of my ancestral culture and cuisine. Cassava is a pretty foundational carb in Vietnam. In chè (sweet desert drink), cassava is chunky and starchy like real taro milk teas. In bánh khoai mì nướng (cassava cakes), it acts as the foundational starch forming a cake vaguely resembling butter mochi when it’s extra crispy but with a warm stickiness.

    That’s why when I found out this little Costa Rican restaurant served mashed cassava, I was pretty interested and confused! I thought it was just a root vegetable grown in the tropical South East Asia. Is this restaurant trying to explore new flavors and textures by including some foreign tastes? Maybe there’s some Asian immigration that brought it over. I know there’s been lots of Asian immigration throughout the world, where Chinese fled the cultural revolution, Vietnamese fled after the fall of Saigon, and Thai intentionally sent out their culinary diplomats.

    What tripped me up here is discovering that cassava and yuca are the same! That’s right, those yuca fries that are all deep fried and served in all those health oriented hipster restaurants I’ve been eating all this time are actually the same starchy root vegetable that I’ve always grown up with! Suddenly things make sense, like how yuca fries were so commonly served with tostones (fried smashed plantains) in the Puerto Rican parts of Chicago.

    Then it just took a little bit more for me to realize tapioca is just the starch of cassava! Those tapioca pearls in boba, tapioca starch used in noodles… it’s all over the place! It’s interesting to take a step back away from food and just look at constitutes it. So rolled cassava starch makes boba and rolled palm starch makes sago. But then we have Northern Africa rolling wheat flour to make couscous! Same idea but a totally different application. Should we start putting couscous in milk teas too?

    A lot of the world cuisine and culture is through various amounts of globalism and colonialism, with Costa Rica being no exception. Why does Costa Rica speak Spanish? Because Spain colonized it. Why is Costa Rica’s currency colón? Because Christopher Columbus is Cristóbal Colón in Spanish. Why is it called Costa Rica? Because Christopher Columbus landed first on a beach here and notice natives wearing lots of gold jewelry and believed that this was a coast of riches. Cassava originated from somewhere around this part of America. Europe imported it and, through vast global trade, cassava eventually made its way to South East Asia.

    Steamed white sea bass served on top of mashed cassava and smothered in seafood gravy. Ribbons of carrots balance on top of a slice of grey squash.

    I like eating food because it makes me think and learn a lot, not only about culture and history, but also about what I want to incorporate into my life. It kicks me out of my routine. I’m always hunting for new inspiration for what to cook either on a regular basis or for parties. Parties in particular make me excited because I get to share my experience with other people.

    The ribbons of carrots on top of a single slice of squash also really interested me. Obviously, there’s an aesthetic appeal to the looping tower of root but I think this style lends itself to be cooked VERY quickly. It’s extremely noticeable how fast Costa Rican food comes out after being ordered. Usually, we wait at most 10 or 15 minutes, versus most places in the United States we can easily wait up to 45 minutes. Is it a cultural thing here to get served fast food? I’m not really sure, but it’s definitely something noticeable.

    Also, the seafood gravy — another inspiration bit. If I make anything with shrimp, I peel it and boil the shells in some water to make a shrimp broth, leaving the meat for whatever I originally intended (paella, fried chicken eggs, tacos). Normally, I just boil the shrimp shells for a while, add some salt, and then mix in a bit of dissolved corn starch to thicken it. This is similar to a Chinese style of making any type of sauce or gravy. On the other hand, Kiré served it european style where you make a roux from frying flour in butter and then using that to thicken the seafood stock. Perhaps this is an indication of Spanish colonialism? While it was overly salty in my opinion, the texture really goes well with the dish, strongly resembling a traditional American mashed potato with turkey gravy.

    Beyond the difference in texture and consistency, the gravies here also seem to be fairly spiced or even spicy. Maybe it’s the Caribbean influence or maybe it’s the South American influence, in either case, this is another dimension of gravies I’ve never explored and it’s opening up a whole new world of culinary ideas! Gravies are always savory yet kind of bland in a very French European way. It’s a meat reduction with butter and flour. Can we add spices? Can we add more herbs? Can we make it sweet instead of savory? Butter, flour, and milk is foundational to pastries and gravies so I don’t think it’s too far off.

    All in all, I found this dish to be super interesting and I learned a lot about colonialism and Costa Rican culture while digging into this. I hope this excites you too! Want to try it? Go visit Kiré located in Koora Hotel in Monteverde, Costa Rica or invite me to your next potluck.

    Happy travels y pura vida!

    Update Oct 17: I should have waited to write about this because apparently yuca cakes are a thing here too! Remember how I talked about cassava cakes on Vietnamese cuisine? They’re pretty similar! This particular yuca cake is served with condensed milk and is fairly chunky, whereas the Vietnamese one is much less sweet and has a thicker bite. While the Vietnamese cassava cakes are a snack, these Costa Rican yuca cakes are like a dessert—soft, warm, fluffy, sweet.

    Top left are “yuca cakes” as described by our nature guide. They served this with fried plantains and recommended to eat with the cheese in the same bite.

  • A Blanket Of Smoke

    A Blanket Of Smoke

    In the summer of 2020, a suprise thunderstorm struck California swepping lightning strikes across the golden state. It was a surreal moment that lasted a few minutes, but the wildfires that soon overwhelmed our state would last months.

    Here are two panoramas I took before and during the 2020 California wildfires. Beautiful rolling clouds of pink and orange were replaced with a blanket of smoke. The Santa Teresa mountains are now obscured. You can even see the dry grass that feeds California wildfires, our amber waves of grain. View more detail!

    On August 16th, 2020 at 6 in the morning, our Nest cam captured a huge blast of thunder and lightning. With a bright flash and a loud bang, the lightning storm rolled into San Jose and across most of California. The shockwave left car alarms ringing in the distance.

    I woke up suddenly from the blast and ran to the window to see if I could still catch any strangling lightning strikes. The storm passed quickly but I caught a video of some short strikes. Within a minute, the whole ordeal was over.

    Jaden Schaumburg (unaffiliated) tweeted a picture of “a massive fast-moving apparent ‘Roll Cloud’ impacted the Santa Cruz Coast shortly before 3 a.m. Sunday morning.” Above the clouds is the beautiful night sky and below lies lightning strikes at a distance into the ocean.

    It was the talk of the town! Freak thunder storms, a minute of much needed rain, and beautiful photos of lightning and strange cloud formations. Little did we know that this would be the catalyst for some of the largest and most uncontrolled burns in California history.

    When I took the second panorama, the air quality index had already reached ~200 (very unhealthy) and visibility was about 1 mile. No longer could you see the Santa Cruz mountains in the far distance. The beautiful pink clouds were replaced by a blanket of purple-grey haze.

    It’s sometimes easy to forget, but San Francisco was bright red for the next few days. At the height of the pandemic lockdown in the US, the sun painted the city red through the low smoke cover across the city. We spent the rest of summer with a little tint of yellow/brown. The world did everything it could to ensure we wouldn’t go outside. Our main respite from the COVID lockdown was going to parks, enjoying some sun, and going on walks. Yet some rolling clouds managed to take all that away from us for so many weeks.