[prev in list] [next in list] [prev in thread] [next in thread] 

List:       calendarserver-users
Subject:    Re: [CalendarServer-users] DCS Production Deployment
From:       Gaurav Jain <monkeyfdude () gmail ! com>
Date:       2015-02-19 1:33:40
Message-ID: CAJ9azkD0bPXZUHVCwOV0QDpGA5J_taO0zHyQWUzR=RTKMGQ2HA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thank you very much for all your support!

On Wed, Feb 18, 2015 at 4:49 PM, Andre LaBranche <dre@apple.com> wrote:

> Hi Rhodey,
>
> Comments inline.
>
> > On Feb 18, 2015, at 4:18 PM, rhodey <rhodey@anhonesteffort.org> wrote:
> >
> > I've been running DCS in production for the past ~year, at the moment my
> > deployment supports ~800 users. It took *a lot* of reading through doc
> > and code to feel even remotely comfortable with storing real data for
> > real people and I still don't feel all that great about it.
>
> We are slowly compiling actual documentation. I'll take this as feedback
> in support of accelerating this process.
>
> > ...
> >
> > 2. DCS uses the python twisted framework but at the same time it
> > doesn't-- calls to DirectoryService (regardless of the implementation)
> > are blocking 0.o
>
> I believe this is addressed in 6.0+ with the new twext.who stuff that is
> all async, iirc.
>
> > 3. DCS has this weird multi-process, master-slave concept where multiple
> > DCS instances run on the same box-- I just think this is weird and
> > dealing with dead processes has been strange.
>
> The Python GIL means we need a multi process architecture to saturate CPU
> on multi core systems. Technically these processes are all part of the same
> service instance because they all cooperate on doing the work.
>
> > 4. If a user uploads a contact containing a photo and you're using a
> > database for storage (as you should), DCS will store that photo in your
> > database-- yuck! Even with your 1000 users, each with maybe 100 contact
> > photos, things get kinda bloated. So, I modified DCS to strip contact
> > photos from contacts and store them in Amazon S3, then piece them back
> > together on demand.
>
> Cool hack :)
>
> > 5. Someone could DOS my DCS instances via network resource exhaustion
> > very easily and there is very little that I could do to stop it other
> > than launch a crazy number of EC2 instances and burn through money. DCS
> > is not efficient (blocking calls to DirectoryService, etc) and I feel
> > very uncomfortable having any less than than two m3.medium instances
> > running at all times (costly!).
>
> Understood, however this is true of any network service that limits its
> own concurrency (imo this is required of any sane service). Part of the
> challenge is the extremely large range of request cost for legitimate
> CalDAV requests. We are moving to a model where we do more work a
> synchronously in a database work queue, and we now have a notion of cost in
> that implementation, so we are becoming better equipped to address resource
> utilization problems.
>
> > All that being said, DCS is still the best free and open source option
> > out there but I wish I had written my own WebDAV server from scratch
> > using 'dropwizard' instead. The world of high availability services
> > changes so rapidly and many of the ideas in this project are dated--
> > like, even table joins really shouldn't exist anymore.
>
> We're not yet ready for NoSQL but maybe someday :)
>
> Thanks for the feedback. I'm interested to hear anything else you'd like
> to share about your experiences hosting DCS.
>
> -dre
>
> >
> > -- rhodey orbits
> >
> >> On 02/18/2015 01:04 PM, Gaurav Jain wrote:
> >> Hi,
> >>
> >> Thank you very much for CalendarServer
> >>
> >> I have few questions:
> >>
> >> * I used CalendarServer-5.2.2 during development phase.
> >> * Now I want to use it for some real (users) use cases.
> >> * Right now, I do not have any scaling issues.
> >> * I run it on Ubuntu EC2 instance.
> >>
> >> My question is:
> >>
> >> * Has CalendarSever-5.2.2 been used in PROD deployments?
> >> * Since I don't have scaling issues, is it ok to use XMLDirectoryService
> >> for like 1000 accounts?
> >>
> >> Any tip would be useful for PROD deployments. Even for 1000 users, we
> would
> >> like it not to go down at all.
> >>
> >>
> >> Best Regards,
> >> Gaurav Jain
> >>
> >>
> >>
> >> _______________________________________________
> >> calendarserver-users mailing list
> >> calendarserver-users@lists.macosforge.org
> >> https://lists.macosforge.org/mailman/listinfo/calendarserver-users
> > _______________________________________________
> > calendarserver-users mailing list
> > calendarserver-users@lists.macosforge.org
> > https://lists.macosforge.org/mailman/listinfo/calendarserver-users
> _______________________________________________
> calendarserver-users mailing list
> calendarserver-users@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/calendarserver-users
>

[Attachment #5 (text/html)]

<div dir="ltr">Thank you very much for all your support!</div><div \
class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 4:49 PM, \
Andre LaBranche <span dir="ltr">&lt;<a href="mailto:dre@apple.com" \
target="_blank">dre@apple.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi Rhodey,<br> <br>
Comments inline.<br>
<span class=""><br>
&gt; On Feb 18, 2015, at 4:18 PM, rhodey &lt;<a \
href="mailto:rhodey@anhonesteffort.org">rhodey@anhonesteffort.org</a>&gt; wrote:<br> \
&gt;<br> &gt; I&#39;ve been running DCS in production for the past ~year, at the \
moment my<br> &gt; deployment supports ~800 users. It took *a lot* of reading through \
doc<br> &gt; and code to feel even remotely comfortable with storing real data \
for<br> &gt; real people and I still don&#39;t feel all that great about it.<br>
<br>
</span>We are slowly compiling actual documentation. I&#39;ll take this as feedback \
in support of accelerating this process.<br> <br>
&gt; ...<br>
<span class="">&gt;<br>
&gt; 2. DCS uses the python twisted framework but at the same time it<br>
&gt; doesn&#39;t-- calls to DirectoryService (regardless of the implementation)<br>
&gt; are blocking 0.o<br>
<br>
</span>I believe this is addressed in 6.0+ with the new twext.who stuff that is all \
async, iirc.<br> <span class=""><br>
&gt; 3. DCS has this weird multi-process, master-slave concept where multiple<br>
&gt; DCS instances run on the same box-- I just think this is weird and<br>
&gt; dealing with dead processes has been strange.<br>
<br>
</span>The Python GIL means we need a multi process architecture to saturate CPU on \
multi core systems. Technically these processes are all part of the same service \
instance because they all cooperate on doing the work.<br> <span class=""><br>
&gt; 4. If a user uploads a contact containing a photo and you&#39;re using a<br>
&gt; database for storage (as you should), DCS will store that photo in your<br>
&gt; database-- yuck! Even with your 1000 users, each with maybe 100 contact<br>
&gt; photos, things get kinda bloated. So, I modified DCS to strip contact<br>
&gt; photos from contacts and store them in Amazon S3, then piece them back<br>
&gt; together on demand.<br>
<br>
</span>Cool hack :)<br>
<span class=""><br>
&gt; 5. Someone could DOS my DCS instances via network resource exhaustion<br>
&gt; very easily and there is very little that I could do to stop it other<br>
&gt; than launch a crazy number of EC2 instances and burn through money. DCS<br>
&gt; is not efficient (blocking calls to DirectoryService, etc) and I feel<br>
&gt; very uncomfortable having any less than than two m3.medium instances<br>
&gt; running at all times (costly!).<br>
<br>
</span>Understood, however this is true of any network service that limits its own \
concurrency (imo this is required of any sane service). Part of the challenge is the \
extremely large range of request cost for legitimate CalDAV requests. We are moving \
to a model where we do more work a synchronously in a database work queue, and we now \
have a notion of cost in that implementation, so we are becoming better equipped to \
address resource utilization problems.<br> <span class=""><br>
&gt; All that being said, DCS is still the best free and open source option<br>
&gt; out there but I wish I had written my own WebDAV server from scratch<br>
&gt; using &#39;dropwizard&#39; instead. The world of high availability services<br>
&gt; changes so rapidly and many of the ideas in this project are dated--<br>
&gt; like, even table joins really shouldn&#39;t exist anymore.<br>
<br>
</span>We&#39;re not yet ready for NoSQL but maybe someday :)<br>
<br>
Thanks for the feedback. I&#39;m interested to hear anything else you&#39;d like to \
share about your experiences hosting DCS.<br> <br>
-dre<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; -- rhodey orbits<br>
&gt;<br>
&gt;&gt; On 02/18/2015 01:04 PM, Gaurav Jain wrote:<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; Thank you very much for CalendarServer<br>
&gt;&gt;<br>
&gt;&gt; I have few questions:<br>
&gt;&gt;<br>
&gt;&gt; * I used CalendarServer-5.2.2 during development phase.<br>
&gt;&gt; * Now I want to use it for some real (users) use cases.<br>
&gt;&gt; * Right now, I do not have any scaling issues.<br>
&gt;&gt; * I run it on Ubuntu EC2 instance.<br>
&gt;&gt;<br>
&gt;&gt; My question is:<br>
&gt;&gt;<br>
&gt;&gt; * Has CalendarSever-5.2.2 been used in PROD deployments?<br>
&gt;&gt; * Since I don&#39;t have scaling issues, is it ok to use \
XMLDirectoryService<br> &gt;&gt; for like 1000 accounts?<br>
&gt;&gt;<br>
&gt;&gt; Any tip would be useful for PROD deployments. Even for 1000 users, we \
would<br> &gt;&gt; like it not to go down at all.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Best Regards,<br>
&gt;&gt; Gaurav Jain<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; calendarserver-users mailing list<br>
&gt;&gt; <a href="mailto:calendarserver-users@lists.macosforge.org">calendarserver-users@lists.macosforge.org</a><br>
 &gt;&gt; <a href="https://lists.macosforge.org/mailman/listinfo/calendarserver-users" \
target="_blank">https://lists.macosforge.org/mailman/listinfo/calendarserver-users</a><br>
 &gt; _______________________________________________<br>
&gt; calendarserver-users mailing list<br>
&gt; <a href="mailto:calendarserver-users@lists.macosforge.org">calendarserver-users@lists.macosforge.org</a><br>
 &gt; <a href="https://lists.macosforge.org/mailman/listinfo/calendarserver-users" \
target="_blank">https://lists.macosforge.org/mailman/listinfo/calendarserver-users</a><br>
 _______________________________________________<br>
calendarserver-users mailing list<br>
<a href="mailto:calendarserver-users@lists.macosforge.org">calendarserver-users@lists.macosforge.org</a><br>
 <a href="https://lists.macosforge.org/mailman/listinfo/calendarserver-users" \
target="_blank">https://lists.macosforge.org/mailman/listinfo/calendarserver-users</a><br>
 </div></div></blockquote></div><br></div>



_______________________________________________
calendarserver-users mailing list
calendarserver-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic