Latest / CyberSecurity Summary / Scalable Data Streaming with Amazon Kinesis: Design and secure highly available, cost-effective data streaming applications
Transcript
- 0:00Speaker 1: Welcome to the deep dive. Today. We're diving into well,
- 0:03Speaker 1: a really fundamental challenge in computing these days, handling that
- 0:07Speaker 1: absolute flood of data, you know, the high speed stuff.
- 0:10Speaker 2: Yeah, it's relentless. I think social media, IoT sensors, everywhere,
- 0:14Speaker 2: web clicks, it just keeps coming.
- 0:17Speaker 1: And it's not just the sheer volume, right, it's how
- 0:19Speaker 1: bursty it is. You get these sudden peaks exactly.
- 0:22Speaker 2: That borestiness is the real killer. Our sources. They show
- 0:26Speaker 2: that building systems that don't just fall over when you
- 0:29Speaker 2: get a sudden rush, like say everyone trying to check
- 0:32Speaker 2: out a bike in a smart city right at five pm,
- 0:34Speaker 2: that needs special thinking. Traditional approaches just won't.
- 0:37Speaker 1: Cut it right. So our mission today is basically to
- 0:40Speaker 1: give you a solid shortcut to understanding these kinds of architectures.
- 0:43Speaker 1: Will use the Amazon Kinesis family, you know, data streams,
- 0:47Speaker 1: fire hose, data analytics, video streams, kind of as our
- 0:49Speaker 1: case study.
- 0:50Speaker 2: Yeah. The goal is by the end you'll really get
- 0:52Speaker 2: the difference between these tools, and more importantly, the core
- 0:55Speaker 2: idea is behind making these systems scalable and crucially fast.
- 1:00Speaker 1: Okay, let's kick off with the big why why is
- 1:02Speaker 1: speed so important in data analysis. Now why the big rush?
- 1:05Speaker 2: Well, it's become a strategic must have. Really, we've moved
- 1:09Speaker 2: way beyond just looking backwards. Yeah, like those old batch
- 1:12Speaker 2: jobs running overnight giving you a report.
- 1:14Speaker 1: On yesterday, right, a snapshot of the past exactly.
- 1:17Speaker 2: Now, it's all about immediate insights, the freshest possible data.
- 1:21Speaker 2: Let's you make the best decisions right now, perishable insights.
- 1:25Speaker 1: Basically, I've heard about this thing, the O day loop observe, orient, decide, act.
- 1:31Speaker 1: It comes from military strategy. I think, how does real
- 1:34Speaker 1: time data fit in there?
- 1:36Speaker 2: It fits perfectly. Real time analytics fundamentally strengths that observe window.
- 1:40Speaker 2: Something happens, you know about.
- 1:42Speaker 1: It instantly, which means you can orient, decide, and act
- 1:45Speaker 1: much faster.
- 1:46Speaker 2: Precisely gives you a huge edge. Think about frog detection
- 1:50Speaker 2: or optimizing ad placements on the fly, or in that
- 1:53Speaker 2: smart city example, rerouting maintenance crews instantly based on real
- 1:58Speaker 2: time bike usage patterns.
- 2:00Speaker 1: Okay, so that's the why. Now the how? A single
- 2:03Speaker 1: server obviously can't cope, so we use distributed systems. Lots
- 2:05Speaker 1: of servers network together. But does not just explode the
- 2:08Speaker 1: complexity failure modes everywhere.
- 2:10Speaker 2: Oh absolutely, It gets complex fast, but engineers figured it
- 2:14Speaker 2: out ways to manage it. Two main patterns really help
- 2:18Speaker 2: tame that initial complexity.
- 2:19Speaker 1: Beast Okay, what were they.
- 2:21Speaker 2: First standardized interfaces? Things like APIs This really paved the
- 2:26Speaker 2: way for micro service architectures.
- 2:28Speaker 1: Ah, so breaking the big system down into smaller independent
- 2:32Speaker 1: services exactly.
- 2:33Speaker 2: It lets different teams own their piece and you know,
- 2:36Speaker 2: iterate faster without stepping on each other's toes.
- 2:39Speaker 1: It sounds a bit like Conway's law in action, the
- 2:42Speaker 1: system design mirroring the ORG structure.
- 2:45Speaker 2: That's a great way to put it. Yeah, small independent
- 2:47Speaker 2: teams tend to build small independent services. Those standardized interfaces
- 2:52Speaker 2: are what make it work smoothly.
- 2:53Speaker 1: Okay, interfaces help services talk. But what about failures? If
- 2:57Speaker 1: one micro service crashes while it's processing data, how do
- 3:00Speaker 1: you stop it from dragging down everything else that depends
- 3:03Speaker 1: on it?
- 3:03Speaker 2: Right, that's the castgating failure problem. And that's where the
- 3:06Speaker 2: second pattern comes in. Decoupling. You use an asynchronous message broker.
- 3:10Speaker 1: A message broker like a middleman for data sort of.
- 3:14Speaker 2: Yeah. It acts as the stable buffer, an invariant in
- 3:17Speaker 2: the system. If a downstream service, a consumer fails, the
- 3:21Speaker 2: broker just holds onto the incoming messages. It builds up
- 3:25Speaker 2: a backlog.
- 3:25Speaker 1: So the producer can keep sending data unaware of the
- 3:29Speaker 1: downstream problem.
- 3:30Speaker 2: Exactly, the failure is contained. Once the consumer service comes
- 3:33Speaker 2: back online, it just starts processing the backlog from the broker.
- 3:37Speaker 2: No data lost, no castkating crash.
- 3:39Speaker 1: That makes sense. The broker isolates the fault. But if
- 3:43Speaker 1: that backlog keeps growing, that sounds like trouble brewing. What
- 3:46Speaker 1: metrics do we watch?
- 3:47Speaker 2: The key capacity metric is transactions per second tps. That's
- 3:51Speaker 2: usually limited by either the number of records per second
- 3:54Speaker 2: or the total data size like megabytes per second.
- 3:56Speaker 1: Okay, tps, but what's the danger signal the real data.
- 4:00Speaker 2: Your signal is back pressure. That's when your producers are
- 4:02Speaker 2: sending data faster than your consumers can process it. Input
- 4:06Speaker 2: tps is consistently higher than output tps.
- 4:08Speaker 1: So back to the bike sharing rush hour hits every
- 4:11Speaker 1: bike starts pinging its location like crazy. How do you
- 4:13Speaker 1: handle that surge, that back pressure without the system just drowning.
- 4:18Speaker 2: You've got a few strategies ranging from let's say gentle
- 4:21Speaker 2: to pretty aggressive. Okay, you can throttle the producers tell
- 4:25Speaker 2: the bikes, hey, maybe only report your location every minute
- 4:28Speaker 2: instead of every second during peak times.
- 4:30Speaker 1: Reduce the input rate makes.
- 4:32Speaker 2: Sense, Or you can scale the consumers. If you're in
- 4:35Speaker 2: the cloud, you might automatically spin up more instances of
- 4:38Speaker 2: your processing application to handle the load.
- 4:40Speaker 1: Add more workers, right.
- 4:42Speaker 2: You can also use bigger buffers in the message broker
- 4:44Speaker 2: itself to just absorb temporary spikes. But the most drastic
- 4:48Speaker 2: option is to just drop messages drop data.
- 4:52Speaker 1: That sounds risky.
- 4:53Speaker 2: It is. You'd only ever do that for non critical data.
- 4:56Speaker 2: Like maybe dropping some routine sensor readings is okay if
- 4:59Speaker 2: the systems overloaded, but you'd never drop something like a
- 5:02Speaker 2: customer order completion message. Never.
- 5:04Speaker 1: Okay, got it? Critical versus non critical. Let's dig into
- 5:08Speaker 1: the stream itself. What are the absolute basic parts of
- 5:11Speaker 1: any streaming system for main components?
- 5:14Speaker 2: Yeah, you can break it down pretty simply. First you
- 5:16Speaker 2: have the producers. These are the apps sending the data,
- 5:19Speaker 2: our bike sensors, the user's mobile app checking out a bike,
- 5:22Speaker 2: that kind of thing.
- 5:23Speaker 1: Okay, producers send data.
- 5:24Speaker 2: Then you have the messages or records. That's the actual
- 5:27Speaker 2: data payload, usually small, maybe I a few kill bytes
- 5:31Speaker 2: often capped around a megabyte. Each record has the data
- 5:34Speaker 2: itself and a header, usually with a unique ID the
- 5:37Speaker 2: broker assigns.
- 5:38Speaker 1: Got it, producers messages.
- 5:40Speaker 2: Third is the stream or the broker. That's the component
- 5:43Speaker 2: doing the buffering, like canisis itself.
- 5:45Speaker 3: Or Kafka the fault isolator we talked about, right, And
- 5:48Speaker 3: finally you have the consumers, the applications that pull data
- 5:51Speaker 3: from the stream and actually do something with it, analysis, storage, triggering, alerts.
- 5:55Speaker 1: Whatever, producers, messages, stream consumers. Okay, now latency you mentioned
- 6:02Speaker 1: speed is critical the source of stress. We need to
- 6:05Speaker 1: be really precise here. It's not just latency. They're two
- 6:08Speaker 1: specific measures.
- 6:09Speaker 2: Yes, absolutely critical distinction. There's propagation delay that's simply the
- 6:14Speaker 2: time it takes from the moment of producer writes a
- 6:17Speaker 2: message to the moment a consumer reads it raw transmission speed.
- 6:21Speaker 1: Basically okay, right to read time. What's the other one?
- 6:24Speaker 2: The other and often more telling metric is the age
- 6:28Speaker 2: of the message. This measures how long a message has
- 6:31Speaker 2: actually been sitting in the stream before a consumer picked
- 6:34Speaker 2: it up.
- 6:35Speaker 1: Ah, So propagation delay could be low, but the message
- 6:38Speaker 1: might still be old. If the consumers are lagging exactly.
- 6:41Speaker 2: If that average message age starts creeping up, that's your
- 6:43Speaker 2: big warning sign. It means your consumers can't keep up.
- 6:46Speaker 2: The backlog is growing, and performance problems are right around
- 6:49Speaker 2: the corner, even if the network itself is fast.
- 6:52Speaker 1: That's a really important distinction. Now, failure modes distributed systems
- 6:56Speaker 1: retries network glitches. It means data streams all and have
- 7:00Speaker 1: this at least once delivery guarantee right, a message might
- 7:03Speaker 1: show up more than once.
- 7:04Speaker 2: That's the standard reality. Yes, because ensuring exactly once delivery
- 7:09Speaker 2: across a distributed system is incredibly hard. Most brokers guarantee
- 7:14Speaker 2: at least once. The producer might retry sending if it
- 7:17Speaker 2: doesn't get confirmation the consumer by process and in crash
- 7:20Speaker 2: before confirming. Duplicates happen, and that.
- 7:23Speaker 1: Sounds potentially disastrous. If you're, say, processing payments or updating
- 7:28Speaker 1: inventory accounts, double counting.
- 7:30Speaker 2: It would be disastrous, which is why the responsibility for
- 7:33Speaker 2: handling duplicates shifts downstream to the consumer or the final
- 7:37Speaker 2: destination system. Those systems must be designed to be idempatant idempatent,
- 7:42Speaker 2: meaning meaning processing the same message multiple times has the
- 7:46Speaker 2: exact same effect as processing it just once.
- 7:48Speaker 1: How do you achieve that two main ways.
- 7:50Speaker 2: Either the operation itself is naturally idempatant like setting a
- 7:53Speaker 2: value as adempatent adding to a count, or is not,
- 7:56Speaker 2: or you use that unique ideed. It's typically in the
- 7:59Speaker 2: message payload to explicitly check if you've already processed this
- 8:02Speaker 2: specific message before de duplication.
- 8:04Speaker 1: Basically okay, So the consuming application needs to be smart
- 8:08Speaker 1: about duplicates. What about errors within a message? If a
- 8:12Speaker 1: consumer gets a record it just can't process.
- 8:15Speaker 2: That leads to a particularly nasty problem called the poison pill.
- 8:19Speaker 1: Poisman pill sounds bad, It is.
- 8:22Speaker 2: Because message streams usually guarantee the order of messages, at
- 8:25Speaker 2: least within a certain context. Like all messages for a
- 8:29Speaker 2: specific bike, you need to process the unlock event before
- 8:33Speaker 2: the return event takes sense.
- 8:34Speaker 1: Order matters.
- 8:35Speaker 2: But if one message in that sequence causes an error
- 8:38Speaker 2: in the consumer, maybe it's malformed bad data, and the
- 8:42Speaker 2: consumer keeps retrying and failing on that specific message, it
- 8:46Speaker 2: gets stuck. It gets completely stuck. That single poison pill
- 8:49Speaker 2: record blocks the processing of all the perfectly valid records
- 8:52Speaker 2: sitting behind it in the stream for that same bike
- 8:55Speaker 2: or whatever the ordering context is. The whole sequence grinds
- 8:58Speaker 2: to a halt because of one bad message.
- 9:00Speaker 1: Wow, so a single bite of bad data could effectively
- 9:03Speaker 1: block a whole partition of the stream, causing a latency
- 9:06Speaker 1: for everything behind it to skyrocket exactly.
- 9:09Speaker 2: It really highlights why robust error handling and potentially dead
- 9:13Speaker 2: letter cues for problematic messages are so crucial in consumer design.
- 9:18Speaker 1: Okay, that sets the stage really well. Let's move on
- 9:20Speaker 1: to the specific tools Amazon offers with Kinesis to handle
- 9:23Speaker 1: all this at scale. Starting with the foundation canesis data
- 9:27Speaker 1: streams or KDS. When do you reach for this?
- 9:30Speaker 2: KTS is your go to when you need maximum control,
- 9:34Speaker 2: high durability, and really low latency. We're talking subsecond processing
- 9:39Speaker 2: for your own custom applications that read directly from the stream.
- 9:42Speaker 1: And the core unit of KDS is the shard, right,
- 9:45Speaker 1: what does that actually do?
- 9:46Speaker 2: The shard is the fundamental unit of capacity and parallelism
- 9:49Speaker 2: in KDS. Each chard has fixed limits on how much
- 9:53Speaker 2: data it can ingest typically one megabyte per second or
- 9:55Speaker 2: one thousand records per second, whichever comes first, and also
- 9:58Speaker 2: how much data can be read out.
- 10:00Speaker 1: If I need more capacity, I just add more shards
- 10:02Speaker 1: pretty much.
- 10:03Speaker 2: Yeah, you scale the stream by scaling the number of shards.
- 10:05Speaker 1: Okay, and if we're tracking millions of bike journeys, how
- 10:08Speaker 1: does KDS decide which shard a specific bike's data goes
- 10:12Speaker 1: to and keep it in order.
- 10:13Speaker 2: That's determined by the partition key. When your producer application
- 10:17Speaker 2: sends a record to KDS, it includes a partition key.
- 10:20Speaker 2: This could be the bike ID for instance.
- 10:22Speaker 1: And KTS uses that key to route.
- 10:25Speaker 2: The data exactly. KTS hashes the partition key and uses
- 10:29Speaker 2: the result to assign the record to a specific shard.
- 10:32Speaker 2: All records with the same partition key always go to
- 10:35Speaker 2: the same.
- 10:35Speaker 1: Chard ah, and that's how it guarantees order. Within that key,
- 10:38Speaker 1: all data for bike one twenty three lands on, say,
- 10:41Speaker 1: shard five, in the correct sequence precisely.
- 10:45Speaker 2: But this also highlights a potential pitfall, the hot partition
- 10:48Speaker 2: key or hot shard. If one partition ke, like a
- 10:52Speaker 2: super popular bike or a single central sensor, sends way
- 10:55Speaker 2: more data than others, its shark can get overwhelmed while
- 10:58Speaker 2: others are idle.
- 10:58Speaker 1: So choosing a good part two key that distributes data
- 11:01Speaker 1: evenly is critical for performance, maybe not just the bike idea.
- 11:04Speaker 1: If usage is very uneven.
- 11:06Speaker 2: Right, sometimes using a more random key or combining fields
- 11:10Speaker 2: is necessary to spread the load effectively.
- 11:12Speaker 1: Now reading the data, Let's say we have multiple apps
- 11:14Speaker 1: wanting that bike data, one for maintenance alarts, one for
- 11:17Speaker 1: route analysis. How do they read efficiently? You mentioned Enhanced
- 11:20Speaker 1: fan out EFO.
- 11:21Speaker 2: Yes, so, standard KDS consumers work on a pull model.
- 11:24Speaker 2: They pull the shard for data, but each chard has
- 11:27Speaker 2: a total read capacity limit about two megabytes per second
- 11:30Speaker 2: that all standard consumers share.
- 11:32Speaker 1: So if you have lots of consumers pulling the same shard,
- 11:34Speaker 1: they start slowing each other down exactly.
- 11:36Speaker 2: They compete for that shared bandwidth. Enhanced fan out EFO
- 11:41Speaker 2: solves this with EFO. Each registered consumer gets its own
- 11:44Speaker 2: dedicated throughput limit per shard, delivered via push model from Kinesis.
- 11:49Speaker 1: So EFO consumers don't interfere with each other.
- 11:52Speaker 2: Correct. It allows multiple real time applications to consume from
- 11:55Speaker 2: the same stream at high speed independently. If you need
- 11:58Speaker 2: scale on the consumer side, EFO is often essential.
- 12:02Speaker 1: Okay, KTS for flexible, low latency custom apps. What about
- 12:06Speaker 1: Kinesis Data fire Hose KDF. People often call it the
- 12:09Speaker 1: easy loader.
- 12:10Speaker 2: Why because it is KDF is fully managed, totally serverless
- 12:14Speaker 2: and Its whole purpose is to make it super simple
- 12:17Speaker 2: to capture streaming data and load it into specific destinations.
- 12:20Speaker 2: Think S three data laks, redshift data warehouses, elastic search
- 12:24Speaker 2: for search, that kind of thing.
- 12:25Speaker 1: How easy is easy?
- 12:26Speaker 2: Often zero code is needed for the delivery part. You
- 12:29Speaker 2: can figure fire Hose in the console, point it at
- 12:31Speaker 2: your stream source which could even be KDS, tell it
- 12:34Speaker 2: where to send the data, and it handles the scaling, buffering, delivery,
- 12:38Speaker 2: and retries automatically.
- 12:40Speaker 1: Does it do anything else like transform the data?
- 12:43Speaker 2: Yes, you can. It has built in capabilities for data
- 12:45Speaker 2: format conversion like Jayson to park, and it can also
- 12:48Speaker 2: invoke an AWS lambda function to perform custom inline transformations
- 12:53Speaker 2: basic epl before the data lands and the destination.
- 12:56Speaker 1: Okay, KTS gives us speed and flexibility. KDF gives us
- 13:00Speaker 1: ease of use for loading data, sinks. What's the catch
- 13:03Speaker 1: with KDF? What's the tradeoff?
- 13:05Speaker 2: The main trade off is latency because fire Hose buffers
- 13:08Speaker 2: data internally, often for several seconds or even minutes to
- 13:11Speaker 2: batch it efficiently for delivery to the destination.
- 13:14Speaker 1: Ah, It's not truly real time like KDS.
- 13:16Speaker 2: Can be exactly. It optimizes for delivery throughput and cost
- 13:19Speaker 2: effectiveness by batching, not for subsecond end to end latency,
- 13:23Speaker 2: So if you need that immediate subsecond processing, KDS is
- 13:26Speaker 2: the choice. If your goal is reliable, easy loading into
- 13:30Speaker 2: F three or redshift and near real time is good enough,
- 13:32Speaker 2: KDF is often way simpler.
- 13:34Speaker 1: Makes sense speed versus simplicity. Now, analysis kinesis data analytics kDa.
- 13:41Speaker 1: How does this fit in analyzing the stream as it flows?
- 13:44Speaker 2: Precisely? kDa is also serverless, and it lets you run
- 13:47Speaker 2: continuous queries or applications against your streaming data, either from
- 13:50Speaker 2: KDS or KDF. It offers two different.
- 13:53Speaker 1: Engines for this, Okay, what are the engine choices?
- 13:55Speaker 2: First is a sqel engine. If you're familiar with standard SQL,
- 13:59Speaker 2: you can use ans icql to query the stream. kDa
- 14:02Speaker 2: presents the stream data within windows, like tumbling windows of the
- 14:06Speaker 2: last five minutes or sliding windows, so.
- 14:08Speaker 1: You could write a query like select count from bike
- 14:11Speaker 1: stream where status in US, group by location district over
- 14:15Speaker 1: a rolling time.
- 14:16Speaker 2: Window exactly that kind of thing. It treats the incoming
- 14:19Speaker 2: stream like a continuously updating table. You can query. Very
- 14:22Speaker 2: powerful for many common analytics tasks and accessible if you
- 14:26Speaker 2: know SQL.
- 14:27Speaker 1: And the second engine you mentioned too.
- 14:29Speaker 2: The second is based on a patche flink. This gives
- 14:31Speaker 2: you much more power and flexibility. You typically write your
- 14:33Speaker 2: applications in Javar Scala.
- 14:35Speaker 1: What can flink do that the SQL engine can't.
- 14:38Speaker 2: Well, flink apps can handle much more complex logic, maintain
- 14:41Speaker 2: sophisticated state across events, and importantly can connect the data
- 14:45Speaker 2: sources and sinks outside of just kinesis and aws like
- 14:49Speaker 2: maybe an on premises KOFKA cluster or a custom database.
- 14:53Speaker 1: And I remember reading flink is key for achieving exactly
- 14:56Speaker 1: once processing semantics. How does it manage that?
- 14:59Speaker 2: Yes, that's a major advantage. Flank achieves exactly once by
- 15:03Speaker 2: carefully managing the application's internal state and periodically saving checkpoints
- 15:08Speaker 2: of that state to durable storage typically S three or
- 15:11Speaker 2: something like rock sysdb. If there's a failure, it can
- 15:14Speaker 2: restore from the last successful checkpoint and resume processing without
- 15:17Speaker 2: missing data or processing duplicates.
- 15:19Speaker 1: So SQL for simpler windowed queries, think for complex stateful
- 15:23Speaker 1: potentially exactly one's processing and connecting anywhere.
- 15:26Speaker 2: That's a good summary.
- 15:26Speaker 1: Yeah, okay, one more service kinesis video streams KBS. This
- 15:30Speaker 1: seems more specialized. Video and audio.
- 15:32Speaker 2: Yeah, KBS is specifically designed for handling time encoded data streams,
- 15:36Speaker 2: primarily video and audio, but potentially other time series data too,
- 15:39Speaker 2: like radar or liar feeds.
- 15:42Speaker 1: How does play out in our smart city bike scenario?
- 15:44Speaker 2: KBS actually addresses two pretty distinct use cases. There first
- 15:49Speaker 2: is real time low latency interaction. Imagine a user wanting
- 15:53Speaker 2: to see a live video feed of a bike stand
- 15:56Speaker 2: on their phone to check if bikes.
- 15:58Speaker 1: Are actually available okay, live streaming.
- 16:00Speaker 2: KVS provides capabilities, often using Web RTC standards for that
- 16:04Speaker 2: kind of low latency peer to peer or small group
- 16:06Speaker 2: video streaming. It manages the signaling channels and things like
- 16:10Speaker 2: stunt and turn servers needed to establish the connections. So
- 16:14Speaker 2: KVS WebRTC.
- 16:15Speaker 1: For live use got it? And the second use case.
- 16:18Speaker 2: The second is more about storage, playback and analysis. This
- 16:20Speaker 2: is KVS storage. You stream video from say security cameras
- 16:24Speaker 2: that the bike stands into KVS for durable storage.
- 16:27Speaker 1: And then what just store it?
- 16:29Speaker 2: You can store it for compliance or later review, but
- 16:31Speaker 2: the real power comes from integrating it with AI and
- 16:33Speaker 2: mL services. For instance, you could feed that stored video
- 16:36Speaker 2: stream into Amazon Recognition.
- 16:38Speaker 1: AH for analysis.
- 16:39Speaker 2: What like running facial recognition to detect known vandals near
- 16:43Speaker 2: the bike stands in real time, or maybe object detection
- 16:46Speaker 2: to count bikes automatically or spot obstructions. Recognition analyzes the
- 16:50Speaker 2: frames ingested via KVS and can trigger alerts or other actions.
- 16:54Speaker 1: So KVS handles both the live interaction piece and the
- 16:57Speaker 1: jest for later analysis piece for video.
- 16:59Speaker 2: Data correct two sides of the video coin.
- 17:02Speaker 1: That's a really helpful tour of the whole Kinesis family.
- 17:04Speaker 1: Let's try to quickly recap the core job of each
- 17:07Speaker 1: one for the listener.
- 17:07Speaker 2: Okay, KTS, that's your foundational low latency, high throughput stream
- 17:13Speaker 2: for custom apps needing maximum flexibility, thinks subsecond speed right
- 17:17Speaker 2: KTF KDF the easy serverlust loader, great for getting streaming
- 17:21Speaker 2: data into S three redshift elastic search without much code,
- 17:25Speaker 2: but sacrifices that subsecond latency for batching efficiency. kDa the
- 17:29Speaker 2: real time Analytics engine, use it SQL interface for simpler
- 17:32Speaker 2: windowed queries, or the Apache frink engine for complex stateful
- 17:36Speaker 2: processing exactly one semantics and broader connectivity.
- 17:39Speaker 1: And finally, KVS KDS.
- 17:41Speaker 2: The specialist for video and time encoded data, handles both
- 17:44Speaker 2: low latency web RTC streaming for live interaction and gerbil
- 17:48Speaker 2: ingestion for storage playback, and AML analysis like recognition.
- 17:53Speaker 1: Perfect summary. Now, before we wrap up, there's a crucial
- 17:56Speaker 1: security point that underpins all of this distributed complexity. How
- 18:00Speaker 1: to secure all these producers and consumers talking to kinesis, Yeah, this.
- 18:04Speaker 2: Is super important. The absolute standard best practice is use
- 18:08Speaker 2: IMA roles. Do not embed long term access keys or
- 18:12Speaker 2: secrets directly into your producer or consumer applications. Why roles specifically,
- 18:16Speaker 2: because IM roles provide temporary, short lived security credentials that
- 18:20Speaker 2: are automatically generated and rotated by AWS. Your application running
- 18:24Speaker 2: on EC two or Lambda or wherever assumes a role
- 18:27Speaker 2: gets temporary permissions, does its work, and those credentials expire.
- 18:31Speaker 1: So even if an application instance gets compromised somehow, the
- 18:34Speaker 1: attacker doesn't get permanent keys.
- 18:36Speaker 2: Exactly, the potential blast radius is dramatically reduced compared to static,
- 18:42Speaker 2: long lived keys being compromised. It's all about implementing least
- 18:46Speaker 2: privileged access using temporary role based credentials. It's fundamental to
- 18:51Speaker 2: secure cloud architecture.
- 18:53Speaker 1: That's a critical takeaway. Okay, let's finish with that provocative
- 18:56Speaker 1: thought we talked about at least once delivery and the
- 18:59Speaker 1: need for dempotency. How should listeners think about that?
- 19:02Speaker 2: Right, we established that GETT duplicates is just a fact
- 19:05Speaker 2: of life in most high performance, resilient streaming systems like
- 19:08Speaker 2: those built on Kinesis data streams. You have to design
- 19:11Speaker 2: for it.
- 19:11Speaker 1: So the provocative thought.
- 19:12Speaker 2: Is think about how profoundly that changes how you have
- 19:15Speaker 2: to design your applications. Yeah, you can never assume an
- 19:18Speaker 2: input an event, A message will arrive only once, might
- 19:22Speaker 2: arrive twice or even more time. So that's rare. So
- 19:25Speaker 2: how does that constraint The absolute certainty that you might
- 19:28Speaker 2: get duplicates ripple through your entire design? How does it
- 19:31Speaker 2: affect your database schemas, your transaction logic, your state management.
- 19:36Speaker 2: Realizing that you must build identity consumers isn't just a detail,
- 19:40Speaker 2: it's a fundamental shift in mindset needed to truly master
- 19:43Speaker 2: streaming architectures.
- 19:44Speaker 1: A great point to ponder designing for repeats, not just requests.
- 19:48Speaker 1: Thanks for breaking all that down.
- 19:49Speaker 2: My pleasure. It's complex, but hopefully a bit clearer now.