4 ms·
Show HN: Manage web sockets from AWS Lambda using Fanout
- jkarneges 9y agoThe chat example is running at ws://58d6587c.fanoutcdn.com/prod/chat if anyone wants to try it. E.g. with wscat: wscat -c ws://58d6587c.fanoutcdn.com/prod/chat > hello < anonymous: hello The backend is here: https://9h8j7cy642.execute-api.us-west-1.amazonaws.com/prod/chat https://9h8j7cy642.execute-api.us-west-1.amazonaws.com/prod/... You can try a direct request to see the backend's response: curl -i -H "Accept: application/websocket-events" -H "Content-Type: application/websocket-events" -d 'OPEN'$'\r'$'\n' https://9h8j7cy642.execute-api.us-west-1.amazonaws.com/prod/chat
- ivan_ah 9y agoNice. The Websockets events as HTTP request response is similar to the architecture of Django Channels.
- jkarneges 9y agoYup, splitting the session into a series of requests is a good way for Django Channels to rig things up, especially since Django itself doesn't support async yet. We even have a library that works similarly: https://github.com/fanout/django-grip https://github.com/fanout/django-grip (goals are different though. maybe someday we'll see ASGI Django apps using GRIP at the same time :))
- je42 9y agowe just went for aiohttp. django channels didn't scale on even very simple benchmarks. while aiohttp didn't even sweat. that said, making everything async in the python sync world was some effort. ;)
- candiodari 9y agoInteresting approach. We could really use a reverse-proxy-for-websockets thing.
- gtsteve 9y agoI hadn't heard of Fanout before. I can't find any info about its global infrastructure - what regions does it serve? It might be helpful in the new year. I'm developing a module for my app which uses websockets but I'm concerned about the performance for our clients in areas not served by AWS such as the UAE.
- jkarneges 9y agoWe have servers in SF, London, and Singapore. http://status.fanout.io http://status.fanout.io