<p>Lately when working on project with up to a million concurrent clients connected I had to replace few instances of central servers with a public ets'es to avoid bottlenecks under heavy concurrent access. So choice of data storage may depend on what are access patterns of your data - i.e. how concurrent reads and writes are.</p>

<p>On Aug 26, 2012 10:22 AM, "Max Bourinov" <<a href="mailto:bourinov@gmail.com">bourinov@gmail.com</a>> wrote:<br>
><br>
> >If you put stats into public ets, than collector will not be<br>
> >overloaded with requests.<br>
><br>
> This is interesting. I also have thoughts about avoid DOS. But I don't understand how ETS will help here.<br>
><br>
> Here what I have. I have only one process that process clients requests. It really doesn't make sense to have more processes because the process does nothing but returns some pre-calculated value. If I store data in ETS my process will have to do additional work - extracting data from ETS.<br>

><br>
> Or maybe I am missing something? Please give the right direction here. Or maybe in my case it doesn't matter because my case is trivial?<br>
><br>
> Best regards,<br>
> Max<br>
><br>
><br>
><br>
> On Sun, Aug 26, 2012 at 12:04 PM, Max Lapshin <<a href="mailto:max.lapshin@gmail.com">max.lapshin@gmail.com</a>> wrote:<br>
>><br>
>> On Sun, Aug 26, 2012 at 12:02 PM, Michael Truog <<a href="mailto:mjtruog@gmail.com">mjtruog@gmail.com</a>> wrote:<br>
>> > There often is a habit with quick projects to throw data in ets, since it is<br>
>> > easy to access the data as global data.  This helps people coming from an<br>
>> > imperative programming background.  I don't see a good reason in the email<br>
>> > thread that shows that ets is the best solution,<br>
>><br>
>><br>
>> But there is a good reason. It is performance. For example, in<br>
>> erlyvideo all major statistics data are<br>
>> collected not via gen_server:cal: you cannot ask process to tell its<br>
>> statistics, because<br>
>> it is very easy to DOS your server with such replies.<br>
>><br>
>> If you put stats into public ets, than collector will not be<br>
>> overloaded with requests.<br>
><br>
><br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
</p>