Thanks for the reply Sairam - these are excellent suggestions. I will give
them a try. I am in fact building a front-end web server serving json.
These are for internal APIs for my company, so perhaps HTTP/json is not the
most efficient approach possible. However, I did want to show what phoenix
& elixir are capable of next to the well-established Java stack that my
company currently wants to continue to invest in.
I am currently not really encoding anything(I don't think). My view has a
render method that looks like this:
def render("product.json", %{product: product}) do
%{id: product.id,
name: product.name,
barcode: product.barcode,
image: product.image,
price: product.price,
market_id: product.market_id}
end
Thanks for the great information - I'll see if I can change the file
descriptors and disable some of the plugs to see if that changes much. My
goal was to see what Phoenix & Elixir looked like out of the box without a
lot of tweaking, but perhaps I just made some really naive newbie mistakes.
As far as docker goes, I mainly did that so that it would be really easy to
get running up on EC2. Currently, I can't seem to get yum to find the
elixir package from the default Amazon Linux AMIs, so its been kind of a
pain to try to get Elixir set up properly.
On Thursday, June 9, 2016 at 11:20:03 PM UTC-7, Sairam wrote:
>
> I am currently learning Elixir. I have read a handful of posts on this.
> What I am saying may not be completely accurate or old(since I only read
> about these in various blogs)
>
> Assuming you are building a front-end web server which serves json? If
> not, RPC would be a faster mechanism to use rather than exposing http
> endpoints.
> Also, minor note: json is slower compared to rest of the encodings like
> msgpack if this is an option. (Link to Uber Blog
> <https://eng.uber.com/trip-data-squeeze/> where analysis was made)
>
> You need to set MIX_ENV=prod when compiling elixir
> http://www.slideshare.net/petegamache/real-world-elixir-deployment#23
> Note: t2.medium is 2 vCPUs with 4 Gigs.
>
> May be you don't even need all the Plugs which Phoenix library provides by
> default like Cookies etc., esp., given you don't use ecto.
>
> Also, horizontal scaling is another aspect you might want to consider to
> show scale up and scale down.
> Also, there is a note about no. of open File Descriptors by default Linux
> has. Change that to infite.
>
> I have not seen/read many blog posts where Docker is used for Elixir. May
> be, you could try it on a bigger box on Heroku if possible to get a end to
> end benchmark (which also takes care of network connectivity)
>
>
> On Fri, Jun 10, 2016 at 10:50 AM, Matt Hornsby <[email protected]
> <javascript:>> wrote:
>
>> Hi all - I could use some help. I am currently evaluating Elixir and
>> Phoenix for a performance-critical application for a Fortune 500 company.
>> This could be another great case study for Elixir and Phoenix if I can show
>> that it can meet our needs. Initial performance testing looked phenomenal,
>> but I am running into some performance concerns that will force me to
>> abandon this tech stack entirely if I cannot make the case.
>>
>> The setup: an out-of-the box phoenix app using mix phoenix.new. No ecto.
>> Returning a static json response. Basically a hello-world app.
>> The hardware
>>
>> - Macbook Pro, 16gb, 8 core, 2.5ghz, running elixir/phoenix natively,
>> and also using docker container
>> - Amazon EC2 T2.Medium running Elixir Docker image
>>
>> The tests: used ab, wrk, siege, artillery, curl with a variety of
>> configurations. Up to 100 concurrent connections. Not super scientific, i
>> know... but
>>
>> No matter what I try, Phoenix logs out impressive numbers to stdout -
>> generally on the order of 150-300 microseconds. However, none of the load
>> testing tooling agrees. No matter the hardware or load test configuration,
>> I see around 20-40 ms response times. The goal for the services that I am
>> designing is 20ms and several thousand requests per second. The load tests
>> that Chris McCord and others have published suggest that I should be able
>> to expect 3ms or less when running localhost, but i'm not seeing anything
>> close to that.
>>
>> Would anyone be willing to work with me to look at some options here? I'd
>> be incredibly grateful. Don't make me go back to Java, please :)
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elixir-lang-talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elixir-lang-talk/6a625e85-8c8d-43c7-9c1b-a204db09307a%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/elixir-lang-talk/6a625e85-8c8d-43c7-9c1b-a204db09307a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elixir-lang-talk/6d295e26-6acd-4078-8488-2317ac923ae5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.