AWS API or EC2 for chat?

19 views
Skip to first unread message

Yoo

unread,
Mar 25, 2020, 2:29:51 AM3/25/20
to Django users
Hi all! I built a chat app without dj channels, but now I’m stuck with pricing... and just AWS in general. Every time I look up Websockets, I’m told to use AWS API Gateway. Why? And if so, how would I split my project between EC2 for website and API Gateway for my mobile users and for chats?

Or am I comparing the wrong things? Is the comparison between gateway and load balancer?

Motaz Hejaze

unread,
Mar 25, 2020, 2:41:30 AM3/25/20
to django...@googlegroups.com
Any hint how you built the chat without channels ? Because i realy hate its complixity ..

On Wed, 25 Mar 2020, 4:30 am Yoo, <andrek...@gmail.com> wrote:
Hi all! I built a chat app without dj channels, but now I’m stuck with pricing... and just AWS in general. Every time I look up Websockets, I’m told to use AWS API Gateway. Why? And if so, how would I split my project between EC2 for website and API Gateway for my mobile users and for chats?

Or am I comparing the wrong things? Is the comparison between gateway and load balancer?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0babe8f3-1472-4bae-bab9-73e265969a87%40googlegroups.com.

Andrew C.

unread,
Mar 25, 2020, 3:08:38 AM3/25/20
to django...@googlegroups.com
The only hint I can freely provide is to use celery tasks. They let you do taskname.delay(pk_user1, for_chat_pk). You  can look online for an article with the url dev.to to setup your asgi.py file. That’s all I can freely give out, though. Good luck!

Motaz Hejaze

unread,
Mar 25, 2020, 3:19:45 AM3/25/20
to django...@googlegroups.com
That was unexpected , i thaught about using python module socketio

Andrew C.

unread,
Mar 25, 2020, 3:25:39 AM3/25/20
to django...@googlegroups.com
I’ve figured my original question out. API Gateway is usually paired with Lambda. They scale easily, but I’m pretty much expecting 24/7 usage, which Lambda isn’t the best option for(???). I use cookiecutter-django, so I’ll be using ECS. Unfortunately, costs are sky high... If anyone’s able to help me out any further regarding costs, please do so. Thanks!

I can provide one last hint. 1) understand what AnonymousUser model is. 2) Look at 

Reply all
Reply to author
Forward
0 new messages