Supercharging Sales Intelligence: Processing Billions of Events via Structured Streaming
Summary
- DigiCert scale: DigiCert provides digital security to 88% of Fortune 500 companies, securing over 28 billion web connections daily through certificates, encryption and authentication services.
- Real-time intelligence pipeline: Using Spark parallel processing and structured streaming, DigiCert ingests, deduplicates and stores millions of daily events from certificate transparency logs in Delta tables.
- Data-driven sales impact: Cost-optimized infrastructure keeps data fresh and accurate, providing the sales team with competitive intelligence for real-time decision-making and market positioning.
Supercharging Sales Intelligence: Processing Billions of Events via Structured Streaming

Talk by Anurag Bharati, Senior Data Engineer, DigiCert ; Nikita Raje, Director-Data Engineering, DigiCert
DigiCert is a digital security company that provides digital certificates, encryption and authentication services and serves 88% of the Fortune 500, securing over 28 billion web connections daily. Our project aggregates and analyzes certificate transparency logs via public APIs to provide comprehensive market and competitive intelligence. Instead of relying on third-party providers with limited data, our project gives full control, deeper insights and automation. Databricks has helped us reliably poll public APIs in a scalable manner that fetches millions of events daily, deduplicate and store them in our Delta tables. We specifically use Spark for parallel processing, structured streaming for real-time ingestion and deduplication, Delta tables for data reliability, pools and jobs to ensure our costs are optimized. These technologies help us keep our data fresh, accurate and cost effective. This data has helped our sales team with real-time intelligence, ensuring DigiCert's success.
Here’s more to explore:
Production ready data pipelines for analytics and AI: https://www.databricks.com/solutions/data-engineering
The Big Book of Data Engineering: https://www.databricks.com/resources/ebook/big-book-data-engineering-2nd-edition
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements
FAQs
What does DigiCert do?
DigiCert is a digital security company providing digital certificates, encryption and authentication services to 88% of the Fortune 500 companies worldwide.
How much data does DigiCert handle?
DigiCert secures over 28 billion web connections daily, making data processing scale and efficiency critical to their operations.
What technology does DigiCert use?
This video shows how Spark parallel processing, structured streaming for real-time ingestion, and Delta tables enable cost-effective aggregation and analysis of certificate transparency logs.
Who benefits from this intelligence?
DigiCert's sales team uses this real-time intelligence pipeline to gain competitive insights and market information for more informed, data-driven decision-making.
Full transcript
Okay. All right. Uh I know it's the afternoon. Thank you so much for showing up. It's the last session. I'm really excited you guys are here. Uh we'll try to make this worth your while. Uh joining me today is and we'll be talking to you about how we supercharge our sales intelligence using data bricks. And let's get started. Little bit about me. Um, my day job is building and scaling large scale data systems that power digert's AI and analytics.
When I'm not chasing down pipelines, I am chasing chickens in my backyard, uh, hiking with my dogs or just managing the chaos of life right now with two little kids. Um, that structure and unpredictability of that life is something I bring into how I think about data systems at work. Um, Onrag, you want to talk a little bit about yourself? Yeah. Hi. So, my slide is a little lot more muted than the previous one. That's because I'm more introverted in nature and my job is as a data engineer.
So, I like to read a lot especially about health, nutrition and scalable systems. And as expected, I would watch documentaries on YouTube and wherever I find them. Uh since I'm from India, I like to watch cricket. Used to play before but not much now. And um got a little bit curious about hydroponics which is basically soilless farming. So, thank you. All right. Thanks. Sanra uh before we jump into the project, I want to take a few minutes to talk about who are we as a company.
So what is Digisert and what it is that they do, right? Digisert is a digital security company. We essentially provides a lot of certificate, encryption and authentication services. Right? Our goal is digital interactions that you guys have in your day-to-day lives. We want you to feel secure about the privacy, the authenticity and also the compliance part of it. Um you know we secure this is just to give us give you a sense of what it is that we secure.
So we secure everything from AI agents to software devices content you know medical devices and everything in between right so you can imagine the amount of data that generates and to put a number to it we help secure about 28 billion web connections every single day. Our goal with this project was how can we get that data and actually you know make it useful for us right so it's not just stored it's not just visible but it's actually useful for us to take strategic decisions on and that is how CC was born now before we talk about the project itself I wanted to give you a sense of you know what was holding us back why didn't we try this two years ago or four years ago uh well the answer is we did try this is the third iteration of our project the first two we tried were on prem and AWS and it didn't really pan out back then.
What was holding us back is the data that we have the telemetry data is incomplete and fragmented. So it's distributed across different systems. It's onrem, some of it is in cloud, some of it is believe it or not still in CSVs and we have to reach out to people to send it to us. Um so obviously all of this made the analysis very inefficient. A lot of manual effort and much more errors possible, right? We lacked real-time insights because all of these systems were refreshing at different rates and then we did not have a single source of truth.
So you ask the same question to five different people across five different departments like you know how many searchs did this account issue today and you get five different answers and so um you know with data bricks we were able to go from in this fragmented world to a focused centralized system in a matter of months. Without it, we would still be, you know, putting together all this data sets with a patchwork of tools.
Patchwork of tools and we would still be, you know, trying to fight scale and losing time instead of actually using this data. Okay. So that is why we built CCE. CC stands for our centralized certificate events platform. Essentially what it does is it consolidates all of this telemetry data into a single unified system. Originally built as a compliance project, we found several applications in our sales and go to market uh teams.
Originally, it was built for proactive compliance monitoring, outlier and anomaly detection. And then the third use case we have is sales intelligence and we were able to generate opportunities from this as well. How does CC transform the game? Right? Like I said, it's essentially pulling together all of the certificate events data from all of these different systems. We are unifying it and we're making it available uh for additional analysis.
Right? What this did for us was it helped us provide complete market visibility. Right? Which means that we would know in an instant at this at the moment it happens like who issued what when to whom and by whom. This is a data that's very crucial to our sales teams. uh we were able to automate a very manual and errorprone process and we were able to provide real-time data for strategic decision-m which meant that our sales and operations teams could actually action on the insights within the window of opportunity.
Um with data bricks we were able to build all of the system once and you able to scale it as our use cases grow from time to time. Okay. Challenges. So building something like this is obviously isn't easy. We had our fair share of challenges. A couple that I want to point out. So one of the core principles of this project is being able to pull public APIs. We pull over 42 different public APIs. We have no control over the reliability or the response time on these APIs.
Right? So being able to pull them in a reliable and scalable manner was crucial. uh we get anywhere from 10 to 90 million records through these uh public APIs every single day and the dduplicate like the duplicate number of duplicates is unknown right so we can't say that it's 50% duplicated or 10% or maybe 100%. So being able to dduplicate at scale was crucial as well. And obviously as you can imagine we generate a lot of data.
So being able to structure the tables in a way that not just the reads but also the rights were fast enough and this is our key constraint which is basically zero reprocessing means once the data point enters our system we never want to process it again. And Anurra will talk to you a little bit more about why that was crucial but it's mostly to do with cost. uh building something like this meant we had to rethink our entire engineering process.
So you know from how we ingest to how we store to how we process and everything in between. So how did we do it right? This is a high level architecture. Um this architecture is built you know it's a standard architecture built entirely on top of data bricks. Uh we use from ingestion all the way to the analytics right. So we use delta lakes spark streaming and we also use data bricks dashboards for this. uh with data bricks we were able to build a modular architecture and as our use cases grow across sales compliance and product we are able to scale it out as needed with that I'll hand over to who's going to talk to us about the architecture in detail thank you um so in this slide I'm going to just mention about how the highle workflow goes and um so the main uh point over here is is that we use data bricks recommended medallion architecture.
So we do have the bronze layer over there which has the raw data that we ingest straight away from the internet. Uh the silver is a little bit of clean data and the bronze sorry and the gold is what we expose to our end users. Um so all the so in the middle layer is where we use spark structured streaming in the in the bronze layer we use u regular data bricks jobs and the last layer is we use stream structure streaming for that but it's a much much less simpler version of what is what happens in the middle u so I'm going to just zoom into so you can clearly see there are three stages over there bronze silver and gold and I'm just going to zoom into each and I'm going to just talk a little bit more about each stage.
So this layer this layer is so we have 40 plus APIs and this layer has only one task which is to download the data from these APIs and store it as is in the bronze layer. There's just one transformation that I do which is the addition of a partition column over here and apart from that we just store it what what we get is what we store in the bronze layer. Um and the task is simple but if you look at the project overall cost this this one stage itself cost 47% of our overall cost.
So and I'll explain why it is so later. Um so this layer also is pretty simple as far as objective is concerned. Since we are pulling data from 40 APIs at the same time there is a very good chance that the same data can show up in multiple APIs. So we do end up getting 3x or 5x or even 7x of the same data again and that duplicate can come in next second maybe after a week, 1 month, 3 months, whenever u this layer does only one task which is to dduplicate the data no matter when we get whether we get it to the right the next instant or we get it after a month the dduplication should happen as it is supposed to be and uh that's what this layer does. simple task but this layer itself cost us 50% of our entire pipeline and the last layer is really simple hardly anything to do over here because we have clean data in the silver so all we have do is we go to our stakeholders get the logic from them uh apply it using spark and store it in the gold layout over here and this is what gets exposed to our stakeholders as far as cost is concerned just 3% so not much um it's not that complex and cost wage also it's pretty uh efficient So yeah, that's about it.
And now that you have an at least a overview of what each stage does, I'm just going to get into what kind of challenges we faced per stage. So as I mentioned, this layer has just one objective. Injust the API data in a reliable and consistent manner. Reliable means regardless of the error if it is an um the API server going down or whatever error it is don't miss the data get it in the next scheduled run that's the meaning of reliable over here and consistent is um download the datas so mean don't download multiple so many copies of the same data that we end up dduplicating a lot just just be in consistent Right.
Uh so that's the whole objective that we do over here. As one of the main challenges in this layer is cost efficiency since we have 40 plus APIs that we download from. We just need to do it in a cost efficient way. So what we do over here is we use multi-threading and we we use one datab bricks job with just one driver and that does all the downloading and all the saving into the final u bronze layer. Uh if we take a driver let's say it has four cores we take a multiple of it as far as threads are concerned and download it in a multi-threaded way store it in our bronze layer and that's why this layer be that's why we are able to achieve cost efficiency because it's just one driver which is doing everything for us over here one error one of the challenges in this um layer is getting rate limit since I have multi-threaded since I'm downloading in a multi-threaded way you can have so many uh threads pulling data from the same API and some often they happen to cross the rate limits.
So to uh slow down that what I have done over here is I've built in exponential block back off into the code itself. So whenever the rate limits exceed uh the exponential backoff kicks in and it slows down it pauses all the threads. So and um once we are within the limits they just resume. So this way there is no error. Usually if you try to download so much you get error 429 which is too many calls I think. Uh so to prevent that the exponential backoff helps us a lot so we don't over cross the rate limits and the next error that we see here is API server error.
So when you're downloading from the internet the server that is serving you the data can go down and it can come up in a matter of minutes hour 2 hours 5 hours I don't know it's not up to me. Uh so what I do to fix this error is I use datab bricks jobs and all these APIs run in a schedule manner. Let's say for example we schedule this once an hour and in hour zero I get an API error which is I think 500 code. So if I get that error I just kill the job there itself and the next schedule run I start the same downloading of data again.
If I get an error again then I kill the job again and then the next schedule run. This way there is zero manual intervention. Even if I'm on holiday, I don't have to worry about it. It'll just do its task. And usually this error resolves soon. Yes, sometimes they do take a few hours. But regardless of it, I there's no manual intervention. It's just automated and that helps a lot. Um, as far as having an automated manner is concerned, otherwise I would have to have one of us log in and check and I I just didn't want that.
So that's how we solved the problem over here. And the last is offset tracking. Since we have 40 APIs and each API gives a lot of data, you don't want to redownload the same thing. Then you'll have thousand copies of the same data point. And neither do you want to miss any record. If you miss it, then again, your stakeholders won't trust your data. They'll just say you're just downloading some random thing which doesn't make sense.
So how do we do that is we use delta tables to capture all the offsets per uh API and once and assume we had 1 million data points to download. All these 1 million is chunked into 0 to 100 then 100 and 1 to 200 200 1 to 300 and so on. We download these chunks. If a chunk fails we read on we try to we retry it in the next schedule run. So we do have all that logics built in. Again, no manual intervention. The code takes care of itself and I'm here delivering a speech.
I don't really have to worry about my pipeline because I know it it'll just work the way it is. And if something goes crazy, I do get alerts for it. Um, usually that doesn't happen, but uh I mean errors don't happen because there's a lot of auto uh checks built in to the pipeline. So, it will just run as is. The next stage um it's just got one task just dduplicate that's it as simple as that but this is the most complex and as per me this particular stage decides the viability of the project because no matter what project you have if it's not going to be within the cost you it'll never work no one's going to use it.
So the um uh so dduplicating as scale is the objective really hard and this is what I'm uh and some of the problem that we see in this layer is a small file problem since I'm using multi-threading I'm there'll be several threads downloading the data and storing it into our target table. So what happens is a lot of files get created in the bronze layer. Um in the keynote we heard about delta tables. Delta tables internally use parket files.
So as you download more and as you save more there just a lot of files going to get accumulated at your source. Um and that's a problem because when my job starts assume I downloaded a thousand files I have to open and read those thousand files and then start parsing the records and that's not efficient. Reading and thousand reading and parsing thousand is not really efficient. You need to compress them. How do I do that is what I'll explain but that's one challenge uh in this layer.
H the next one is growing SARS target table. So we download about 90 million per day average. So in 10 days that's about a billion. And by experience you know when you have large target sorry large tables to do an absert query on initially it'll be fine but then gradually that absurd query will take forever to finish and the cost will just blow out of proportion. So how do we fix that? I'll get into that. So that's one challenge that we see over here.
And the next one is the variable incoming volume. Whether I get 50 million data points in a day or 100 or 200, I don't want to see memory error. I don't want to see out of memory or CPU getting crazy. I don't want to see that. So how do we solve that problem? That's one. Uh so regardless of the incoming volume the pipeline should just work. So that's one challenge uh that we had in this layer. So and I um before I get into the solutions that I use to solve this, I'm just going to explain what are the tasks that I do in this particular layer.
It's just one job uh that runs and it does three it does three things. The first thing that it does is it reads x number of files from the source. So um at uh at source these are all paret files that gets saved. So we read x number of these park files from source. That's the first thing that happens. Second sorry second one is we do some minor transformations on the files that we have loaded from source. And the last is inserting into a target table using the merge command. we we do an upsert and in data bricks it's called a merge command.
Um if the so if the data is already present in the target table don't do anything. If it is not present then insert. So that's the merge command that we use to insert into a target. Just ensure that there's always one copy of a given data point. Uh so these are three tasks that we do per run per loop. And what is the first thing that I do? Okay, yes, these are the first these are the tasks that I do. But what is the first thing I do?
I run an optimize command. And that solves my small file problem. Thousand files with five records each. What optimize does is it compresses them into 10 files of 500 rows each. So instead of reading a,000 files, I only read 10. And that's far more efficient uh and saves a lot of time. Data bricks also does optimize for you automatically but that's not enough for my use case. So that's why I always run an optimize command as the first thing that uh when the job starts and since the files are compressed it's just way more efficient.
Batch size is the single most deciding factor in the uh viability of this project. And batch size is nothing but u how many files are you going to read from the source per loop or per iteration. That's what bat size tells you. There are two flavors of it. Max files per trigger and max bytes per trigger. I use the files per trigger, but you can also use the bytes per trigger, but the logic is the same. how many files you're going to read from the source per loop or how many MB or GB of data you're going to read from the source per loop that's the only logic uh as far as bat size is concerned but this is the most important factor that decides how quick your job will run and if it's going to be efficient or not and that sol that bat size solves my growing size of target table problem um sorry it solves my uh variable incoming data problem volume problem.
Uh I'll explain later how as I get to it, but um and for the growing sizes target uh target table, I use partitioning to solve that problem. So since I'm doing an upsert or a merge query um in a normal unpartitioned table, I will be reading the entire target table while doing the upsert because I have to find the ID. I don't know where that ID is existing because both my source and target tables are partitioned. I only read that exact partition instead of the whole table and our tables are pretty big.
Uh in the previous slide we mentioned they are 75 terabytes plus. I don't have to read the whole thing. I just have to read one partition u where I'm going to be doing an upsert on. So that helps with growing size of target table. And um now I mentioned batch size is the most important factor and it's a tunable factor that you get in structured streaming. Um I'm just going to show here what happens. Okay, since it's a tunable factor, how do I know that whatever batch size I've given is right or wrong.
So the default batch size is th00and. So uh I I increase it to let's say 1500. And then I go into the executors page and I check did anything fail? If yes, then I see a lot of red over there. Those are your failed tasks. And those tasks have failed because they got out of those executors failed because they went out of memory. I don't want that because what every time an executor goes down, it'll slow down the whole thing because then you have to bring up a new executor.
You all that has to happen. I don't want that. It'll slow down my overall execution and make the whole process expensive. Um so that's what I check if I increase the batch size from th00and which is default to,500 I go and check if have my any executors failed. If not I'm good then I increase it a little more. What I also check is uh this is the metrics page on your spark cluster. This is how it I would like it to be.
The first graph is CPU. Second is uh your RAM usage and the third is your disk swap utilization. everything is consistent. There's no spikes. So, I don't want this. Uh the CPU is all over the place. The disk space uh RAM is also all over the place. And you can see a little bit of swap. It's just it's the it's a it's the worst thing to have um when you are working with Spark Structured because um if you get even one failure, you have to restart the whole job.
So, basically, you are paying two times the amount to do the same processing. So, and I want to avoid that. So u this is how I check if my batch size is well or not. Uh if it is if I find some out of memory or anything going out of how I would want it to be, I just reduce it. Uh and it's a tunable parameter. So um you just need to keep tuning it. There is no thumb rule for it. I just use these to figure out if I'm okay or not.
And the last stage is the simplest one. But before proceeding since I just spoke a lot and as per me is a little bit confusing but if you have any clarification I'm open to take any questions now. Okay moving on. So the last stage is um um where we expose the data to our stakeholders in the previous layer. Now we have clean data which is dduplicated and ready for use. and uh and in the previous layer when I if I get this duplicated data at the right instant or it's if it comes after a week or after a month or even after two years it doesn't matter because I'm using an upsert query using partition columns it will work as expected with no duplicates and uh that's why that's how I fix the problems over there and now in this stage the objective is to build a base data set uh so our stakeholders can use it in their downstream reports and it's got two challenges.
One is to be flexible towards the evolving business logic. So we use um spark streaming over here but the code has been modularized. So if a particular mapping has changed it's very easy to swap it out. It's so the code so the you need to keep in mind when you're building any streaming or even a batch pipeline just modularize it. So if the business logic changes tomorrow, all you need to do is just swap out that particular component, not the whole code.
Um so that's how it uh this is flexible towards business logic and allow for optimized reads. In all the previous layers, I just wanted my rights to be fast. But here since it's a read heavy applic uh layer, I want my reads to be fast and it has to be fast because we our tables are pretty big over here. It's got billions of rows uh and it's always growing. So how do we allow for optimized reads is there's a there's a delta table setting that you get and it's called data skipping numbum indexed columns.
What that does is it captures the default setting is 32 which means the first 32 columns of your uh delta table the metadata for it is get is getting captured the averaged and this things like that get captured. So when you give a filter where age is less than 10, the delta table knows in your large table which particular section to go and search the data for. It's not going to search the whole thing. That's how your reads get quicker.
So we use this a lot. However, if you do if you if you increase this a lot then your metadata increases then u then you have a lot of storage to do. You don't have to do it but at the back end there is and that storage leads to increased costs for you. So what we do is we put it to much lower. I think it is at seven or eight. That's what we use. So we capture the metadata for the first seven or eight columns. And uh and those are the important columns that our stakeholders uh use to filter data on.
So that's how our reads are quicker over here. And yeah, thank you. Over to you. All right. Thanks. Um to finish up, I mean it's a good project. It's been working great for us but obviously we want to improve on it right. Uh so what are we looking at? Uh first and foremost conversational AI that's that's what you know the whole conference has been about. So we're totally working on this. We are working to see how we can get this information out of the hands of analysts and engineers and put it in the hands of our sales team so they can ask natural language questions directly and don't have to wait on an analyst or engineer to give them the insight.
Um we're working with um Genie mainly to be able to create an app that can do this for us. And then the second thing that we are focused on and it's kind of the two and three combined together is we want to optimize our pipeline as much as possible so we can enable that real-time search. We have another app built on data bricks apps which basically helps uh our end users is this is sales and marketing teams actually search through this data set at scale but it's not quite real time yet.
So we want to make it more robust so we can get get to that realtime search. But yeah, that's it. That's that's our project and thank you so much for your time. We'll thank you. Uh we'll take any questions. I know the quest is over but if you can please take the survey so we can present next year again. Thank you. Thank you.
Learn more about the Databricks Data and AI platform.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.