EC2 with ECS (ECS container instance)

An ECS container instance is nothing more than an EC2 instance that runs the ECS Container Agent. The EC2 instance is owned and managed by you. The instance appears in the list of EC2 instances like any other EC2 instance. The ECS Container Agent regularly polls the ECS API if new containers need to be started or stopped. Usually, you run a cluster of container instances in an auto-scaling group. ECS is free of charge. You only pay for the EC2 instances. The downside is that you have to scale, monitor, patch, and secure the EC2 instances yourself. Especially the scaling is not easy because:

  • There is no obvious metric to scale the cluster and no integration to scale when the task placement fails because of insufficient capacity.
  • The auto-scaling group and ECS are not aware of each other which makes task deployments very hard during cluster scale in or rolling updates via CloudFormation 202007061337 .
  • You have to scale down without killing running tasks which is an even more significant challenge for long lived tasks.

Comparison with Fargate

Pros

  • Significantly cheaper for very predictable workload at higher scales (See pricing information for EC2 here)

    Cons

  • It’s difficult to scale EC2 container instances; Fargate takes care of scaling, so has lower operational cost.

Created from: Project overview 202007010930


uid: 202007011438 tags: #amazon

February 22, 2023

06-28-20

Played cricket today. I didn’t really get a good rhythm while bowling, but but someone out. Batting wise, I batted pretty well in the first innings - next step is to generate more power, but I think I’ve found my niche of rotating the strike. Also need to be playing on the front foot more, especially balls that are coming straight (don’t try to hit cross-batted shots for those).

Currently reading Eat that Frog 202006281345 - don’t think it’s as well written as some of the other productivity books I’ve read, but I think the main premise, which is that for tasks that you don’t really want to do, just pull off the bandaid quick and get the task over and done with, is a really important insight for me. I’m definitely guilty of wrapping up a bunch of smaller tasks (that aren’t really valuable to me) and leaving the task that actually has a longer impact to the last minute. Definitely one of the habits that I want to change. Therefore, after I write this journal entry, I’m going to work on EE until I’ve finished at least one total question. Then I’m going to take a break, and then keep working until I’ve solved two questions. My goal is to have half of the homework finished by today.

I did two questions! And watched a video for another one. I think I’ll do the last question right now, and then organize my schedule for the upcoming week (daily review?) and then go to bed.


uid: 202006281343 tags: #journal

February 22, 2023

Eecs 16b Lecture (Time-varying Complex Exponential Inputs)

Prev meeting: EECS 16B Lecture (16A review and PMOS) 202006231100

V_in(t) with a resistor and capacitor

Mathematically, we want to solve the diff eq

ddtx(t)+ax(t)=g(t) x(t) + ax(t) = g(t)

Homogenous part should be similar to last time.

Ways to solve this:

  1. Piecewise approximation

    It’s kinda hard to do it (fa19 note 2 pg 8)

  2. Integrating factor

    Choose $y(t)$ such that $y(t) = ay(t)$, we can use product rule in reverse to get something like this

    ddt(x(t)y(t))=g(t)y(t)(x(t)y(t)) = g(t)y(t)

    ddt(x(t)(y(t))=g(t)y(t) (x(t)(y(t)) = g(t)y(t)

    We know that $y(t) = e^{at}$

    So ultimately we have that $x(t) = e^{-at}g() e^{a} d+ ke^{-at}$

    In the circuit, we have that

    ddtV0(t)+1RCV0(t)=VinRC V_0(t) + V_0(t) =

    So comparing the equations, we have that

    V0(t)=et/RCVinRCeθ/RCdθ+Ket/RCV_0(t) = e{-t/RC}e{/RC}d{} + Ke^{-t/RC}

    If you plug in values assuming $V_in(t) = VDD$, $V_0(0) = 0$, $g(t) = VDD / RC$ (constant values), you can see that a bunch of stuff cancels out and it works (matches yesterday)

Didn’t take the best notes on this, but it’s ($e^{st}$) world ($V = e^{st}$), similarly for $I$


uid: 202006251100 tags: #meetings #ee16b

February 22, 2023

Bloom Two-Sigma Effect

Summary

Students who were tutored one-on-one showed a prodigious improvement in their performance and mastery of the given subjects, compared to the control group in Bloom’s experiment. This has a couple of interesting consequences —

  1. If we can use technology to provide similar individualized attention (maybe through AI) without expending the human resources otherwise necessary, we might be able to make a pretty big change in education.
  2. Labeling students as weak or strong ignores a whole range of factors that could significantly change their educational performance.

Bloom found that the average student tutored one-to-one using mastery learning 202006241451 techniques performed two standard deviations better than students who learn via conventional instructional methods — that is, the average tutored student was above 98% of the students in the control class”.

Seems like there are two parts to this — the fact that instruction was individual, and the mastery learning pedagogical techniques involved. Not sure why those weren’t separated? Or maybe mastery learning techniques involve one-on-one teaching as a subset.

Created from: It’s Time To Build - Andreessen Horowitz 202006241440


uid: 202006241441 tags: #knowledge

February 22, 2023

202006220859 Ben Kuhn’s Weekly Review

I’ve had to iterate a lot on the format and timing of the weekly review to get to one where I can consistently maintain the habit and output useful weekly reviews. The format I currently have is:

Review happens first thing every Saturday morning. This time is sacred and (largely) immovable. Morning is really important for having the right energy and mindset; weekend is important so I’m not distracted by work; consistency is important so that I don’t lose the habit.

I start the review by re-reading some parts of my favorite essays of life advice. (Different parts/essays every week. This also sometimes gets me to notice new parts of the essays that resonate or spark interesting thoughts.)

Next, I load the week back into working memory by reviewing what happened during the week.

Based on the above I’ll write down a list of topics to think about, taking written notes on each topic as I think about them.

I also have a set of recurring prompts that I think about every week. I tweak them over time as they get stale, but some examples would be:

Was I consistent at my core habits this week (exercise, morning routine, todo system, etc.)? How can I tweak them to be more consistent or more useful?

What did I do this week that was a mistake and how can I avoid repeating it?

How much of this week did I spend on stuff that was truly my comparative advantage? For everything else, how can I get out of the loop?


uuid: 202006220859 tags: #productivity #insights

February 22, 2023

Maintaining my relationships

  • 3 things I can do to be a better boyfriend
    1. Since Mulan is in a situation where she feels afraid to initiate stuff (or because of her mild depression), she doesn’t really feel the desire to make as much of an occasion about things as she did previously, I should be actively initiating stuff more with her!
    2. Actively think more about how cool she is, and her accomplishments (I sometimes think more about them for other people, but don’t recognize them when she does super cool shit). Also encourage her to tell me more about stuff!
  • 1 thing I can do to be a better son
    1. Do more unprompted nice things (like getting gifts! Not necessarily expensive ones, but thoughtful ones, if I see them) [like oh I saw this online, I thought you would like it, or this would work for you]
    2. I’m already doing a decent amount for this, but making sure to wish my parents good night every night, and regularly give them hugs / be there for them.
  • 1 thing I can do to be a better brother
    1. Think of a good way to address the situations where I think she’s being lazy or spending too much time on her phone (or better yet, don’t address them at all, because it’s not really my business, they don’t really affect her in any kind of negative way, and when it actually matters (i.e. we’re doing something together as a family), she’s never on her phone. So it doesn’t really matter.

uid: 202006140154 tags: #living-well #relationships

February 22, 2023