How large can state be in an EventStore projection?

When creating a projection using the JavaScript API in eventstore, how large can the state object become? Is this limited to the amount of memory on the machine or is this saved to disk? I would think the later would be more impactful in terms of how large of a state you could hold.

its limited to a few MB I forget the exact number off the top of my head. I would however not recommend doing this and would instead use an external projection at this point.

I thought so, I really just wanted a quick and dirty way to create an “index” of some sort other than the index by linking to another stream. An external projection would definitely be much better as you’ve said.

but linkTos are tiny what is the worry about MBs of state?

Ah, no nothing really. I’m actually considering using linkTos or an external projection. It’s just that linkTos might not fit my current problem, but we’ll see. To give you an idea, I have a customer support ticketing system which customers can interact with through SMS using a long code number, to make it simple, I want to index a customer’s currently open ticket to their messaging address so I don’t have to have some sort of saga or weird cookie or what have you. I figured some sort of index would help, and I’m exploring whether to linkTo another stream by address or to have a state projection based on a sort of “open-ticket” and “close-ticket” type events. The “open-ticket” event would have the customer’s address in there. What would you recommend in this scenario? Honestly, I was only exploring using the state you give me in event store just because I was being lazy, but I figured I shouldn’t anyway.